|
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..
|