 |
ช่วยหน่อยครับ เรื่องการปรับ โค้ด php 5.3 ครับ มัน Error |
|
 |
|
|
 |
 |
|
คือสอบถามหน่อยครับพอดีใช้ php 5.2 ผมรันระบบขอเพลง smiletag shoutbox ได้ แต่พอเปลี่ยนเป็น 5.4 ขึ้น Error ตามนี้ครับ
Code
Warning: Parameter 1 to DOMIT_Lite_Parser::startElement() expected to be a reference, value given in /home/khunmyco/domains/developradio.com/public_html/station/request/lib/domit/xml_saxy_shared.php on line 258 Warning: Parameter 1 to DOMIT_Lite_Parser::startElement() expected to be a reference, value given in /home/khunmyco/domains/developradio.com/public_html/station/request/lib/domit/xml_saxy_shared.php on line 258 Warning: Parameter 1 to DOMIT_Lite_Parser::dataElement() expected to be a reference, value given in /home/khunmyco/domains/developradio.com/public_html/station/request/lib/domit/xml_saxy_shared.php on line 279 Warning: Parameter 1 to DOMIT_Lite_Parser::endElement() expected to be a reference, value given in /home/khunmyco/domains/developradio.com/public_html/station/request/lib/domit/xml_saxy_shared.php on line 266 Warning: Parameter 1 to DOMIT_Lite_Parser::endElement() expected to be a reference, value given in /home/khunmyco/domains/developradio.com/public_html/station/request/lib/domit/xml_saxy_shared.php on line 266 Fatal error: Call to a member function hasChildNodes() on a non-object in /home/khunmyco/domains/developradio.com/public_html/station/request/lib/St_XmlParser.class.php on line 40
ทดสอบโดย url : www.developradio.com/station/request/admin ไอดี admin พาส testdevelop ครับ
และถ้าตาม Error บรรทัดที่ 258 จะเป็นโค้ดดังนี้
Code
function fireStartElementEvent($tagName, $attributes) {
call_user_func($this->startElementHandler, $this, $tagName, $attributes);
} //fireStartElementEvent
/**
* Fires an end element event
* @param string The end element tag name
*/
function fireEndElementEvent($tagName) {
call_user_func($this->endElementHandler, $this, $tagName);
} //fireEndElementEvent
มีอะไรผิดตรงไหนรึเปล่าครับ เพราะสคริปนี้ผมก็แก้ไปพอสมควร แต่อันนี้ไฟล์นี้โค้ดเดิมๆเลยครับ
ปล.เปลี่ยน php ไม่ได้ เพราะโฮสติ้งบอกให้แก้ไฟล์
Tag : PHP
|
|
 |
 |
 |
 |
Date :
2015-06-08 20:28:38 |
By :
naibar3 |
View :
841 |
Reply :
5 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
function fireStartElementEvent($tagName, $attributes) {
call_user_func($this->startElementHandler, $this, $tagName, $attributes); // 4 element
} //fireStartElementEvent
/**
* Fires an end element event
* @param string The end element tag name
*/
function fireEndElementEvent($tagName) {
call_user_func($this->endElementHandler, $this, $tagName); // 3 element
} //fireEndElementEvent
ปล. ไม่รู้ว่าเขียนโค๊ดยังไงนะครับ แต่เห็นแตกต่างกันก็ตรงนี้ ครับ
|
 |
 |
 |
 |
Date :
2015-06-08 20:39:39 |
By :
Chaidhanan |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเปลี่ยนเป็น
Code (PHP)
call_user_func(array($this, 'startElementHandler'), $this, $tagName, $attributes);
|
 |
 |
 |
 |
Date :
2015-06-08 23:44:46 |
By :
mr.v |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
method นี้มีอยู่จริงรึเปล่าครับ startElementHandler() ใน class SAXY_Lite_Parser
|
 |
 |
 |
 |
Date :
2015-06-10 16:17:57 |
By :
mr.v |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|