我正在发展一个会员制度,我碰到了阻碍,通常我只会在这里张贴问题,但我有一个错误,我无法计算,并已在这个错误超过一个小时。
我得到的错误是:
*分析错误:第10行/home/ob219/public_html/membership/core/init.php中的语法错误,意外的',‘
我只是看不到代码中的错误,就会用第二双眼睛来查看代码。
码
<?php
session_start();
$GLOBALS['config'] = array(
'mysql' => array(),
'host' => '#####',
'username' => '###',
'password' => 's####',
'db' => '####'
),
'remeber' => array(
'cookie_name' => 'hash',
'cookie_expiry' => 604800
),
'session' => array(
'session_name' => 'user'
)
);
spl_autoload_register(function($class) {
require_once 'classes/' . $class . 'php';
});
require_once 'functions/sanitize.php';发布于 2014-01-06 18:23:09
'mysql' => array(),应该是'mysql' => array(
发布于 2014-01-06 18:27:00
$GLOBALS['config'] = array(
'mysql' => array(
'host' => '#####',
'username' => '###',
'password' => 's####',
'db' => '####'
),
'remeber' => array(
'cookie_name' => 'hash',
'cookie_expiry' => 604800
),
'session' => array(
'session_name' => 'user'
)
);发布于 2014-01-06 18:30:48
$GLOBALS['config'] = array(
'mysql' => array(), <===== syntax error here. you don't want the close) and commahttps://stackoverflow.com/questions/20956592
复制相似问题