Thanks Mike,
I think that is what I want to do, i'll give it a go
Thanks
Lee :-)
Mike Cullerton [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
on 1/13/02 6:07 AM, FiShcAkE at [EMAIL PROTECTED] wrote:
Try that again, without pressing ctrl-enter this time!!
As I said, I have got the usual script:
?
if(isset($action))
{
$include = $action;
} else {
$include = home;
}
include($include. .inc);
?
but, how do I put in a custom error page instead of seeing:
if i understand what you are asking, you might try something like
if (is_file($include. .inc)) {
include($include. .inc);
} else {
include(custom_error.inc);
}
you may need to execute is_file($include. .inc) inside a loop so that it
checks in all your inlude_directories.
foreach($dirs as $dir) {
if (is_file($dir.'/'.$include. .inc)) {
blahblahblah
}
otherwise, if you know 'all' the valid files, you could create an array of
filenames and compare $include to elements of the array.
Warning: Unable to access anyotherpage.inc in
/var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70
Warning: Failed opening 'anyotherpage.inc' for inclusion
(include_path='') in
/var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70
I have got an error page for any other url i.e. apagenotfound.php but
I
dont know how to overcome the above.
Thanks in advance
Lee
-- mike cullerton michaelc at cullerton dot com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]