Results 1 to 3 of 3

Thread: PHP: dir pls

  1. #1
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default PHP: dir pls

    HI!

    I just want some advice on what function to use.

    Okay I want to check if the file exists, I would just use an if statement to see if the file can be found.

    should I use dir, readdir or opendir?

    Thanks bbz
    IF U NEWB PLS DONT REPLY.

  2. #2
    Join Date
    Nov 2005
    Posts
    807
    Tokens
    1,335

    Latest Awards:

    Default

    I take it you are trying to look for a file.. so I amsume you mean --
    PHP Code:
    if(file_exists(file.php)) {
    echo 
    "File found";
    }
    else {
    echo 
    "Nope cant find it!";

    although I would think you knew this..

  3. #3
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Yes, I knew there was one but I was searching under dir.

    Tim linked me on messenger, thanks anyway. Thread closed.

Posting Permissions

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