essjay_d12 Posted May 14, 2007 Share Posted May 14, 2007 I want a php script to run when an error occurs (deadlink - file does not exist)..... say a user clicks on a hyperlink within a .html file - which is a dead link. If it is a deadlink then I want a bit of code to run (the code will redirect the user to the correct page) Is this possible? Cheers d Quote Link to comment https://forums.phpfreaks.com/topic/51303-run-php-script-when-error/ Share on other sites More sharing options...
neel_basu Posted May 14, 2007 Share Posted May 14, 2007 What did you mean By [dead link] did you mean 404 Error Page e.g. File Missing ?? If yes you have to configure your Error Pages. Quote Link to comment https://forums.phpfreaks.com/topic/51303-run-php-script-when-error/#findComment-252651 Share on other sites More sharing options...
essjay_d12 Posted May 14, 2007 Author Share Posted May 14, 2007 yes, so it is possible? i can create a php page to run instead of that error page? Quote Link to comment https://forums.phpfreaks.com/topic/51303-run-php-script-when-error/#findComment-252654 Share on other sites More sharing options...
neel_basu Posted May 14, 2007 Share Posted May 14, 2007 You have to change your Error Pages for that. in most of the free hosting you cant change teh Error pages. Search for the option to do it in your cPanel or Pleask or whatevet control Panel You use. Quote Link to comment https://forums.phpfreaks.com/topic/51303-run-php-script-when-error/#findComment-252657 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.