开发者

override base php functions

开发者 https://www.devze.com 2023-01-21 17:19 出处:网络
I have made a function simular to the print_r function in php. Is there a way that you can add to the ba开发者_运维百科se functions of php so any sites that are on your server can use your new functi

I have made a function simular to the print_r function in php.

Is there a way that you can add to the ba开发者_运维百科se functions of php so any sites that are on your server can use your new function.

basically i have made a print r with a header to save the sessions to a file for debugging .

does any one know if this is possible. Thank you :)


Check out the core php.ini directive auto_prepend_file

It's effect is that of automatically adding a require(yourscript.php) to every PHP script. Just throw your function in there and it's available to all PHP scripts on the server (that use that php.ini).


you can add your function as a PEAR extension and put it in a local PEAR repository.

Adding functions to PHP core

0

精彩评论

暂无评论...
验证码 换一张
取 消