简体   繁体   中英

SimpleXMLElement PHP4

我知道SimpleXMLElement在PHP4中不起作用,但是是否可以用类似的东西替换它以使脚本在PHP 4中起作用?

Maybe Ister.org's simplexml44 - PHP4 backport of PHP5 SimpleXML might help you...
Disclaimer : I've never used it at all !

... But I wish you luck : XML-support is one of the "big stuff" that was added in PHP 5...


There were also some XML-related functions/classes in PHP 4 ; but nothing looking like SimpleXML :-(
For instance :


BTW : you should really think about switching to PHP 5 : PHP 4 is not supported anymore, even for security-related bugs !

Did you try your application on a PHP5-enabled server ? If it works, it might allow you to use SimpleXML ;-)
There were some problems switching from PHP 4 to PHP 5 ; but maybe not too many for you application ?

PHP4 had DOM XML and the event-based sax parser . Neither are drop-in replacements for SimpleXml and if I remember correctly, neither were standard, meaning that you need them installed/enabled as extensions. The sax parser also exists on PHP5, so if you want your code to be forward compatible, that is probably the safest bet.

PHP5 saw its first release in 2004 , and PHP4 end-of-lifed almost exactly a year ago. It's time to move up... and to switch webhosts if your current one doesn't even offer the option.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM