Is it possible to include a PHP script to all cPanel accounts in a server without the script residing in each user’s home directory?
For example global.php resides somewhere in the server:
// global.php
class global
{
}
Now user-a.com/test.php and user-b.com/test.php (separate cPanel accounts) will have new global(); available to them?
Put
global.phpin a directory ininclude_path(or create a new one) and all PHP scripts on the server will have access to it viainclude('global.php'). I would recommend against auto-including it though.