Support our site with a small donation.
This Month: $
Total: $118.89
 
Login or Register to leave username.


ws©

Advertisement

Advertise with Western Studios.net
PHP Nuke themes, stock photos, icons, drupal themes and more.
Custom jobs at low cost, free lancers and service buyers.
Free e Cards of holidays, cute animals, nature and more


Your Ad Here


Check if file exists




This tutorial will show you how to check if a file exist on your server. You can use this to check for install.php or some files like that before you run a script.

Steps :
Create a php file and add the following script. I will explain what it does but it should be easy to figure out.

IF(file_exists("install.php"))
{
error("You must remove the install.php file before going any further");
}

As you can see the script checks for "install.php" and if it finds it then it gives and error. You can use this to do other things if the file is found such as run a script, update a database and much more..