How does python-php specify the searchpath in the command line?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.