Is there a quick way to include a standard set of functions defined externally? I’ve defined a few functions and I will need them for several different scripts and don’t want to have to copy and paste them to each script.
@pointfiftyaeAug 06.2005 — #make a file called functions.php (for example) where you write your functions within <?php and ?> tags, and then use include('path/to/functions.php'); or require(...); in the pages that need these functions.
@pointfiftyaeAug 06.2005 — #In this case I'd use require(), since it will stop the execution of the code if the indicated file doesn't exist or if there is an error. Useful for a self-defined functions list.