unexpected T_STRING, expecting T_VARIABLE 深夜未睡的大神们,靠你们了!该怎么处理
程序员文章站
2022-03-30 22:50:14
...
unexpected T_STRING, expecting T_VARIABLE 深夜未睡的大神们,靠你们了!
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in C:\AppServ\www\vote\db.php on line 13
部分代码:
class db{
private static $dbhost;
private static $dbuser;
private static $password;
private static $dbname;
private static $instance=NULL;
private function_construct($host,$user,$pass,$db){ //line 13
self::$dbhost = $host;
self::$dbuser = $usr;
self::$password = $pass;
self::$dbname = $db;
self::creatcon();
}
为什么会错?为什么?求教!
------解决方案--------------------
private function __construct($host,$user,$pass,$db){
空格 双下划线。
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in C:\AppServ\www\vote\db.php on line 13
部分代码:
class db{
private static $dbhost;
private static $dbuser;
private static $password;
private static $dbname;
private static $instance=NULL;
private function_construct($host,$user,$pass,$db){ //line 13
self::$dbhost = $host;
self::$dbuser = $usr;
self::$password = $pass;
self::$dbname = $db;
self::creatcon();
}
为什么会错?为什么?求教!
------解决方案--------------------
private function __construct($host,$user,$pass,$db){
空格 双下划线。
相关文章
相关视频
上一篇: 如何修改npm全局安装模式路径
下一篇: python可以做app么