Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    25
    Thanked 0 Times in 0 Posts

    navigation through folders

    hey guys i dont know what is wrong with this bit of code.

    here is my file layout it goes
    root
    ||
    data
    // \\
    php xml
    so data has both php folder and xml folder and im doing a check from inside php folder to a xmldoc in xml folder,

    PHP Code:
    $xml simplexml_load_file("../xml/users.xml") or die ("Fatal Error opening file"); 
    $auth $xml->xpath("user/username[text()='$username']/../password[text()='$password']/.."
    the problem is in the 1st line, it cant find the xml file
    Code:
    Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "../xml/users.xml" in /var/www/src/data/php/login.php on line 5
    Fatal Error opening file
    please help =(
    Last edited by johnish; 12-05-2008 at 09:33 AM.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    It's not saying it didn't find the file, just that it failed to load it. Is users.xml a well formed xml file? Try an extremely simple xml file (like one node) and see if that works.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •