How do I make sure an include file exists before loading the page?
For instance if it is not just a stylesheet you are including but a file containing data that the page won't make sense without.
<?php
require("musthavethis.php");
//fatal error if not present
include("takeitorleaveit.html");
//if not present just an error message, script continues to run
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More website PHP Questions
How do I get my chat script to include the contents of the msg file in real time instead of only when the page is refreshed?How do I find a visitors IP address?
where do i go to paste my google adsense code?
is there any sendemail function in php for sending contents of a form through email?
Explain why the meaning people have of health may contrast with the meanings other people may hold.
