The php script cannot obtain the specified environment variable and writes a php script: PHPcodefunctionupdateReq () {exec (& quot; pythonhomegunappclim. py & quot;, $ outPut); return $ outPut;} The result is the script clim. py cannot get the specified environment variable. it is set. the root account directly runs the c php script and cannot get the specified environment variable.
I wrote a php script:
PHP code
Function updateReq () {exec ("python/home/gun/app/clim. py", $ outPut); return $ outPut ;}
The result is that clim. py cannot obtain the specified environment variable.
After the environment variables are set, it is okay to run clim. py directly in the root account. Is it a permission issue?
------ Solution --------------------
PHP code
$ Out = array (); exec = ('Ls', $ out); print_r ($ out); // No
------ Solution --------------------
This is related to your environment variables ..