Adding functions to PHP core

前端 未结 5 754
礼貌的吻别
礼貌的吻别 2021-01-22 17:56

I have several functions that I wrote and I use regularly on my servers, is there a way I can add them to the core so I don\'t have to include them from external files?

5条回答
  •  梦毁少年i
    2021-01-22 18:50

    You could add your libraries as a PEAR extension. Then you could add it to your local PEAR repository. Pear is added to the default include path in php.ini. Then you can just use "pear install myextension" on your machines.

    If these are C functions you interface with in php (php extensions) then you can do something similar with PECL.

提交回复
热议问题