Помогите мне исправить эррор. Parse error: syntax error, unexpected $end in C:\AppServ\www\infusions\monitoring_panel\monitoring_panel.php on line 36
Код (Text): if (file_exists(BASEDIR."images/maps/$map.jpg")) { $image = "<img src='/images/maps/$map.jpg'>"; } else { $image = "<img src='/images/maps/none.jpg'>"; } ``;" после ``}" поставь и вывод закрой той же кавычкой, которой открывал
Тоесть Код (Text): if (file_exists(BASEDIR."images/maps/$map.jpg")) { $image = "<img src='/images/maps/$map.jpg'>"; };' else { $image = "<img src='/images/maps/none.jpg'>"; } ?
Код (Text): if (file_exists(BASEDIR."images/maps/$map.jpg")) { $image = "<img src='/images/maps/$map.jpg'>"; } else { $image = "<img src='/images/maps/none.jpg'>"; }; кавычки в выводе (echo) исправь.
echo "<center>$image</center> <span class='small2'>: $map<br> <span class='small2'>: $players/$maxplayers<br> <span class='small2'> : $nextmap<br> <span lang='ru'><a href='http://86.57.15.154/monitoring.php?server=1'> </a></span><br></span> ' <---- ;
Все равно этотже эрор Parse error: syntax error, unexpected $end in C:\AppServ\www\infusions\monitoring_panel\monitoring_panel.php on line 36 Код (Text): <?PHP if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; } openside("Cs.gign.lv"); $server = "Cs.gign.lv"; //Cs.gign.lv $port = "27015"; require_once("class_PQ.php"); $pqinfo = array(); $pq = PQ::create(array('ip' => $server.":".$port, 'querytype' => "halflife_new_queries",)); $pqinfo = $pq->query(array('players','info', 'rules', )); $map = $pqinfo['map']; $players = $pqinfo['totalplayers']; $maxplayers = $pqinfo['maxplayers']; $timeleft = $pqinfo['rules']['amx_timeleft']; $timelimit = $pqinfo['rules']['mp_timelimit']; $map = $pqinfo['map']; $nextmap = $pqinfo['rules']['amx_nextmap']; $gravity = $pqinfo['rules']['sv_gravity']; $freez = $pqinfo['rules']['mp_freezetime']; $friend = str_replace('1', 'Выключино', $pqinfo['rules']['mp_friendlyfire']); $friend = str_replace('0', 'Включено', $friend); $start = $pqinfo['rules']['mp_startmoney']; if (file_exists(BASEDIR."images/maps/$map.jpg")) { $image = "<img src='/images/maps/$map.jpg'>"; } else { $image = "<img src='/images/maps/none.jpg'>"; }; echo "<center>$image</center> <span class='small2'>: $map<br> <span class='small2'>: $players/$maxplayers<br> <span class='small2'> : $nextmap<br> <span lang='ru'><a href='http://86.57.15.154/monitoring.php?server=1'> </a></span><br></span>'; closeside(); ?>
незаметил что бы кавычка была исправленна ... смотри ты как открываешь стринг екхо ? .. а закрываешь как ? (верхний мой пост указывает местонеправильной кавычки ) П.С.: и когда думать начнем ?