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 1 of 1

Thread: file_exists

  1. #1
    Regular Coder sitNsmile's Avatar
    Join Date
    Dec 2009
    Location
    Charlotte, NC
    Posts
    358
    Thanks
    19
    Thanked 2 Times in 2 Posts

    file_exists

    Trying to find why my function for checking to see if the file does exist, but it doesn't seem to work, get no errors. (I noted out the open and read parts cause they made no difference)


    PHP Code:
    public function checkDir($action){
            
            
    //$openDir = opendir("./include");
            //$readDir = readdir("include");
            
            
    if (file_exists('./include/'.$action.'/load.php')) {
                return 
    $action;
            } else { return 
    $action 'home'; }

        } 
    any ideas to check and be sure that the file = true ?

    Thanks
    Last edited by sitNsmile; 03-28-2010 at 03:41 AM.


 

Posting Permissions

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