emediastudios Posted November 13, 2007 Share Posted November 13, 2007 I want to make a custom error file and echo my errors inside it, post the error to a differnt file. Can this be done. Say i have this code echo $count .'failed to upload '; how could i echo that in my error.php file instead of a blank page? Quote Link to comment Share on other sites More sharing options...
AndyB Posted November 13, 2007 Share Posted November 13, 2007 All errors from any script? All errors from any user? All errors from now until the end of time? If all you want to do is append errors to a 'log' file, then look at the file write command, in append mode. Quote Link to comment Share on other sites More sharing options...
trq Posted November 13, 2007 Share Posted November 13, 2007 You asked a similar question a few weeks ago and got a very limited response. Why? Because the description of what it is you want to achieve is very vague. What exactly are you trying to do? Quote Link to comment Share on other sites More sharing options...
emediastudios Posted November 13, 2007 Author Share Posted November 13, 2007 Well i wanted to echo the errors in format. Thats all. wanted to echo the errors in the body of a differnt file, I could use echo "<br>$file_name The File(s) could not be uploaded!<br>The file must be under 1 meg and be of a valid extension type, jpeg, jpg, png or gif!<br /> or print "<meta http-equiv=\"refresh\" content=\"0;URL=property_added_unsuccessfully.php\">"; what i wanted to do is echo the error in property_added_unsuccessfully.php so that they knew which file was the problem, not just open a error page with static text. Does this make sense?? ??? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 there's a number of ways you can do this: - you can send a error message in the string to your current page. - you can send a error message in the string to your error page. - you could send a variable in a string to your error page with a pre-determined error echoing out based on your variable - you can have a error function in your current page - and so on .................. Quote Link to comment Share on other sites More sharing options...
emediastudios Posted November 13, 2007 Author Share Posted November 13, 2007 This option looks good - you can send a error message in the string to your error page. Thanks for your help Do you know how to do this? say i wanted to echo "photo1" exists in a file called error.php Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 13, 2007 Share Posted November 13, 2007 use a php header do a search on google or this website to find out how to create error messages. this can be real simple php............ Quote Link to comment Share on other sites More sharing options...
emediastudios Posted November 13, 2007 Author Share Posted November 13, 2007 Thanks Quote Link to comment 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.