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 to get gmail inboxmessages in php using username and passwordHow can I use sessions in PHP?
How to run a php script on different browsers?
What is a .htaccess file?
How do I find a visitors IP address?
