Results 1 to 3 of 3

Thread: if file is located

  1. #1
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default if file is located

    hi everyone, I am not sure how to do this, but here i go...

    ok I am making a project and I want to have a copyright in it so it cant be removed...

    and my idea is to add a if statement saying/idea like this..

    if(file.php ==0){
    echo
    } else {
    echo error
    }

    trying to use a if statement to locate and see if a file is there.. and if it isnt then show a error and the page cant be displayed, I hope you get it..
    is there another way to show this?
    Hey new design new look, goto xudas for personal webdsign help.. (:

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    can you explain yourself some more?

    php occurs on the server-side, so what you could do is check if the file is on the server, but unless you or someone else that has access to your server, the file will always be there. the way to check if a file is present / readable on a server is

    PHP Code:
    file_exists(file)
    is_readable(file
    both of those will return the boolean value true/false respectively

  3. #3
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    well the project i am making is going to be distributed... soon,maybe.. and I want a copyright.. Its for the copyright I want to check if file is there then echo the file...

    thankyou this helps...
    Hey new design new look, goto xudas for personal webdsign help.. (:

Bookmarks

Posting Permissions

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