redirect missing function error

From: Date: Wed, 11 Dec 2002 22:23:45 +0000
Subject: redirect missing function error
Groups: php.general 
Request: Send a blank email to php-general+get-127921@lists.php.net to get a copy of this message
related to "Automatic include of files containing functions" Can we capture errors for missing functions and have the script correct the problem and attempt again? For example// $result=MyFunction($someVariable); if this function doesn't exist, PHP generates an error. Capture the error and fix it... <pseudo code> error_handler case(missing_function){ require('/path/to/functions/'.$missing_function.'.php'); return/retry the function or line of code > elseif file doesn't exist terminate with helpful info... can't find function in functions dir... } </pseudo code> in short, soe code to drop in the header of each document to remove the requirement to have any functions hard coded into the pages, and simply have a repository of functions in a directory that would be included only when called. Dave

« previous php.general (#127921) next »