die - Custom Error Message in Script Crash? PHP -


i've never worked advanced error handling, , can't find obvious answer searching.

in scope script (require_once) how set custom "die" message?

generally users see page-load die no response. i'd direct them file regarding memory absolutely cannot miss solution.

you can kill script , output message using die() command

die("your message here"); 

you can throw custom exceptions in php 5+, , catch them , @ point output message users.

http://php.net/manual/en/language.exceptions.php


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -