For example, in python, if you type "python-h" in the command line, {code...} is set in PYTHONPATH, which means that the file to be run in python will be searched in the corresponding directory. So there is no function for PHP? I use ProcessBuilder to find the PHP file {... for example, python in the zip file.
Other environment variables:PYTHONPATH : ':'-separated list of directories prefixed to the default module search path. The result is sys.path.
That is, if PYTHONPATH is set, the file to be run in python will be searched in the corresponding directory.
So there is no function for PHP?
I use ProcessBuilder to find the PHP file in the zip file.
List commands = new java. util. ArrayList
(); Commands. add ("python"); commands. add ("-m"); commands. add ("test"); // test. py is in test.zip ProcessBuilder pb = new ProcessBuilder (); pb. command (commands); Map workerEnv = pb. environment (); workerEnv. put ("PYTHONPATH", "/path/to/test.zip"); // the setting of PYTHONPATH is equivalent to setting Process worker = pb in java-cp. start ();
If ProcessBuilder is used to input this environment, how can this problem be solved?
So that the PHP file in the zip file can be run in ProcessBuilder?
Thank you very much!
Reply content:
For example, if you type python in the command line
Other environment variables:PYTHONPATH : ':'-separated list of directories prefixed to the default module search path. The result is sys.path.
That is, if PYTHONPATH is set, the file to be run in python will be searched in the corresponding directory.
So there is no function for PHP?
I use ProcessBuilder to find the PHP file in the zip file.
List commands = new java. util. ArrayList
(); Commands. add ("python"); commands. add ("-m"); commands. add ("test"); // test. py is in test.zip ProcessBuilder pb = new ProcessBuilder (); pb. command (commands); Map workerEnv = pb. environment (); workerEnv. put ("PYTHONPATH", "/path/to/test.zip"); // the setting of PYTHONPATH is equivalent to setting Process worker = pb in java-cp. start ();
If ProcessBuilder is used to input this environment, how can this problem be solved?
So that the PHP file in the zip file can be run in ProcessBuilder?
Thank you very much!
Inphp.iniIninclude_pathConfigure or useset_include_pathThe function can be set.