Anyone knows that? That thing is installed by default. But is there an easy way to check whether an extension is installed or not?
I check that simplexml_load_string is available to me but how do simplexml is not listed on php.ini
SimpleXML is an extension that allows us to easily manipulate and get XML data. SimpleXML provides an easy way of getting an element's name, attributes and textual content if you know the XML document's structure or layout.
Example #2 Create a SimpleXMLElement object from a URL$sxe = new SimpleXMLElement('http://example.org/document.xml', NULL, TRUE); echo $sxe->asXML();
There is another way also. You can create a php page
<?php
echo phpinfo();
?>
You can see Simple XML enabled or disabled here.
This works for me...
extension_loaded('simplexml')
example:
if (extension_loaded('simplexml')) {
echo "all good, extension is installed";
} else{ echo "snip snap! no cigar";}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With