由于安装Mac OSX El Capitain,我得到一个解析错误。该代码在服务器上正常工作,但在我的开发工作站上,我始终得到此错误。解析错误:解析第4行的/Library/WebServer/Documents/website/includes/config.php中的错误
解析错误:解析错误/Library/WebServer/Documents/website/includes/config.php第4行
// Calling code snippet:
include("includes/navbar.php");
require_once("includes/config.php");
$servername = DBHOST;
$username = DBUSER;
$password = DBPASS;
$database = DBNAME;
config.php文件:
<?php
/* Config File for Common Values */
define ("DBHOST", “127.0.0.1:3306”); <--- This is line 4
define ("DBUSER", “userid”);
define ("DBPASS", “password”);
define ("DBNAME", “database”);
?>
这就是使用Word Processing应用程序而不是代码编辑器进行编码时发生的情况。 –
*“<---这是第4行”*,以及5,6和7. –
@ sa-7明确指出您正在等待编辑您的文件是http://stackoverflow.com/review/suggested-edits/10175384改变代码。不要这样做。如果OP使用它,那么这就是问题,并根据它给出答案。您可以修改标签,拼写等,但不代码。 –