ThaiSEOBoard.com

พัฒนาเว็บไซต์ => Programming => ข้อความที่เริ่มโดย: namfon122 ที่ 22 มีนาคม 2011, 10:13:14



หัวข้อ: [ Script ] มีปัญหาค่ะพวก Parse Error....นั่งแก้นานแล้ว:[
เริ่มหัวข้อโดย: namfon122 ที่ 22 มีนาคม 2011, 10:13:14
 :wanwan017:
ช่วยทีนะคะ
ปัญหานี้นั่งแก้แล้วแก้อีกเลยค่ะ

Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or T_VARIABLE or '{' or '$' in /home/xxx/domains/xxx/public_html/.htinc/_mysql.inc on line 76

ด้านล่างคือ line 76 ค่ะ
$this->Link_ID=mysql_pconnect($this->localhost, $this->xxxxxxx, $this->xxxxxxx);

_____________
พอลองลบ $ ที่อยู่หน้าสุดออกไป
this->Link_ID=mysql_pconnect($this->localhost, $this->xxxxxxx, $this->xxxxxxx);

ก็ขึ้นแบบนี้
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/xxx/domains/xxx/public_html/.htinc/_mysql.inc on line 76


ช่วยทีนะคะ งงมานานมากก่ะ line 76

 :wanwan017: :-X


หัวข้อ: _
เริ่มหัวข้อโดย: New2th ที่ 22 มีนาคม 2011, 10:18:35
 :wanwan008:


หัวข้อ: Re: [ Script ] มีปัญหาค่ะพวก Parse Error....นั่งแก้นานแล้ว:[
เริ่มหัวข้อโดย: kitazawa1st ที่ 22 มีนาคม 2011, 10:18:53
ใส่ localhost username password เข้าไปในฟังก์ชั่นตรงๆเลยครับ

ถ้าใช้ $this->localhost มันหมายถึง ใช้ตัวแปรภายใน $localhost นะครับ

ลองเปลี่ยนเป็น
โค๊ด:
$this->Link_ID=mysql_pconnect('localhost', 'username', 'password');

อ้างถึง
resource mysql_pconnect ([ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, int $client_flags ]]]] )


หัวข้อ: Re: [ Script ] มีปัญหาค่ะพวก Parse Error....นั่งแก้นานแล้ว:[
เริ่มหัวข้อโดย: namfon122 ที่ 22 มีนาคม 2011, 20:38:18
ขอบคุณค่ะ ได้แล้วๆ :wanwan002: