-1
我把一些內容到一個名爲「的index.php」的文件和代碼如下:file_put_content()方法錯誤
$put=<<<DEMO
<div id='container' style='width:100%'>
<style>
h1 {font-size:45px;}
</style>
<div id='header' style='background-color:#FFFFFF;'>
<h1 style='margin-bottom:0;margin-top:0;height:20%;float:center;'>
while($row = mysql_fetch_array($result))
{
線108
<table align='left'><tr><td><img src="$row['Website_Name']/index.jpg" align='center' width='240' height='170'></td></tr></table>
<table align='center'><br><tr><td><h1>$row['Business_Name']</td></tr></table>
}
</h1></div>
</div>
DEMO;
file_put_contents("$str/index.php","$put");
但在運行中的代碼瀏覽器,我得到一個錯誤:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in E:\Program Files\xampp\htdocs\registration.php on line 108
什麼是第108行,html表字符串? – 2013-02-16 14:17:24
您在編寫代碼的文件中的代碼或已寫入的代碼中出現此錯誤? – deceze 2013-02-16 14:19:21
@ axel.michel我用第108行來通知第一行的開頭。 108.我用它bcoz它是錯誤行 – user2078502 2013-02-16 14:20:09