Jump to content

simple


LoggedIn

Recommended Posts

<?php
$filename = 'file.php'; //file to check if it excists

if (file_exists($filename)) {  //check if it excists
    echo "The file $filename exists";  // return echo that its there... replace this with the code for the page etc...
} else { //if it doesnt excist
    header("Location: file2.php");//redirect to another page
    die();  //dont load anything else from this page
}
?> 

 

i beleieve this would work

Link to comment
https://forums.phpfreaks.com/topic/85823-simple/#findComment-438002
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.