I have a PHP script which includes one or two other libraries it depends on using the \'include
\' statement. To make it more easily portable, I would like to someho
There's no built in way to do that. I would recommend packaging your code up into a directory and distributing it that way. I do this with PHP, I place the code into a directory "something.module", and then have iterate through a modules directory, including the main file underneath each .module directory. But for something more simple, you could just have a structure like:
my_package/
my_package.php
include1.php
include2.php
my_package.php
would include(realpath(dirname(__FILE__).'/inclue1.php'))
. All other scrits would just have to include('my_packahe/my_package.php')