0
mysql_connect("localhost","root","");
mysql_select_db("hitnrunf_db");
$result=mysql_query("select * from jos_users INTO OUTFILE 'users.csv' FIELDS ESCAPED BY '""' TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n' ");
header("Content-type: text/plain");
header("Content-Disposition: attachment; filename=your_desired_name.xls");
header("Content-Transfer-Encoding: binary");
header("Pragma: no-cache");
header("Expires: 0");
print "$header\n$data";
意外T_CONSTANT_ENCAPSED_STRING在查詢字符串上面的代碼,即在側mysql_quey串語法錯誤,在PHP
我們得到了以下錯誤
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\samples\mysql_excel\exel_outfile.php on line 8
在查詢字符串「\ n」包租不識別爲字符串多數民衆贊成爲什麼以上錯誤得到