Re: xmldoc issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



weetat wrote:
Hi all ,

  I have two server .

  In first server , which PHP version 4.3.2, the code below is ok :

  function validatexmlfile($xmlfilename)
    {
        $_logger = new Log4jLogger();
        $_logger->logdebug("starting validate xml");
$_logger->logdebug("starting validate xml xmlfilename:",$xmlfilename);

        if (!$doc = xmldocfile($xmlfilename)) {
            die("Error in XML");
            $this->xml_error = TRUE;
        }
        // version check
        else if ($doc->version > 1.0) {
            die("Unsupported XML version");
            $this->xml_error = TRUE;
        } else {
            $this->xml_error = FALSE;
        }


  However in second server , it did not get past the xmldocfile() at all.
Anybody have any ideas what is happening ? I have set the error_reporting to E_ALL , but it did not display any error at all.

xmldocfile probably isn't a valid function because you don't have the xml extensions installed.

try:

<?php
$exists = function_exists('xmldocfile');
if ($exists) {
  echo "xmldocfile exists!";
} else {
  echo "xmldocfile doesn't exist!";
}
?>

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux