Fatal error: Class 'XmlLib_xmlParser' not found

來源:互聯網
上載者:User
求助:Fatal error: Class 'XmlLib_xmlParser' not found
安裝了一個免費的PHP產品,訪問首頁就出現了下面錯誤
Fatal error: Class 'XmlLib_xmlParser' not found in .../includes/cls.xml.php on line 122

Line 122的代碼如下:
$n =& new $classname();

cls.xml.php的原始碼為:
http://www.phpclasses.org/browse/file/4915.html

經檢查,在cls.xml.php檔案中有類XmlLib_xmlParser的定義和實現。
是什麼導致了這個問題?php.ini設定或其他設定?linux運行環境?或者代碼原因(感覺不是代碼原因)?

系統內容資訊:
伺服器作業系統: RHEL5.2 WEB 伺服器: Apache/2.4.3
PHP 版本: 5.4.9 MYSQL 版本: 5.0.45

先謝了!!


------解決方案--------------------
可能和php版本有關係,我在5.2上測試沒有問題。
------解決方案--------------------
你這是 php4 下開發的代碼
122 行 $n =& new $classname();
124 行 $n =& new $classname($nodeName, $nodeType);
147 行 $n =& new XmlLib_Node('#text', 3);
159 行 $n =& new XmlLib_Node('#cdata-section', 4);
171 行 $n =& new XmlLib_Node('#comment', 8);
將 =& 改為 =

修改 426 行的
function namespace() {

function ex_namespace() {
然後用工具遍曆項目中的所有檔案,將 ->namespace( 改為 ->ex_namespace(

自 php5.3 起,php恢複了對命名空間(namespace)的支援,於是 namespace 變成了保留字,不能作為函數(方法)名
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.