我的php代碼有問題,因爲它在比較語句後顯示瀏覽器循環中的一半代碼。PHP頁面顯示來自瀏覽器循環的一半代碼
<?
include_once("connection.php");
connect_mysql();
$qry="select * from page_content where pg_id='1'";
$res=mysql_query($qry);
if(mysql_num_rows($res)>0)
{
$r=mysql_fetch_array($res);
$txt = $r["pg_text"];
}
?>
它在瀏覽器上顯示如此。 Error on Browser
可能的重複[參考 - 這個錯誤在PHP中意味着什麼?](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php) – Jelmergu
鍵入以下內容:<?php phpinfo(); ?>在文件中。你會得到什麼輸出? –
語法錯誤,php的開始標記應該是'<?php',如果沒有一些配置允許它使用'<?' – Mohammad