Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/360.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
php exec可以';尽管请求的路径正确,但找不到Java JVM dll_Java_Php_Dll_Jvm_Exec - Fatal编程技术网

php exec可以';尽管请求的路径正确,但找不到Java JVM dll

php exec可以';尽管请求的路径正确,但找不到Java JVM dll,java,php,dll,jvm,exec,Java,Php,Dll,Jvm,Exec,我有以下PHP代码: $compileCSS = "C:\ApacheFlexSDK\bin\mxmlc.exe C:\inetpub\utils\css\\". $_POST['cssFileName'] . ".css" . " 2>&1"; exec ( $compileCSS, $output ); // uncomment to see the response to command print_r($output); C:\ApacheFlexSDK\bin\mxm

我有以下PHP代码:

$compileCSS = "C:\ApacheFlexSDK\bin\mxmlc.exe
C:\inetpub\utils\css\\". $_POST['cssFileName'] . ".css" . " 2>&1";
exec ( $compileCSS, $output );
// uncomment to see the response to command
print_r($output); 
C:\ApacheFlexSDK\bin\mxmlc.exe
    C:\inetpub\utils\css\sample.css 2>&1
Array ( [0] => Error loading: C:\Program Files (x86)\Java\jre1.8.0_121\bin\client\jvm.dll ) 
它运行如下命令:

$compileCSS = "C:\ApacheFlexSDK\bin\mxmlc.exe
C:\inetpub\utils\css\\". $_POST['cssFileName'] . ".css" . " 2>&1";
exec ( $compileCSS, $output );
// uncomment to see the response to command
print_r($output); 
C:\ApacheFlexSDK\bin\mxmlc.exe
    C:\inetpub\utils\css\sample.css 2>&1
Array ( [0] => Error loading: C:\Program Files (x86)\Java\jre1.8.0_121\bin\client\jvm.dll ) 
当我运行此命令时,会出现以下错误:

$compileCSS = "C:\ApacheFlexSDK\bin\mxmlc.exe
C:\inetpub\utils\css\\". $_POST['cssFileName'] . ".css" . " 2>&1";
exec ( $compileCSS, $output );
// uncomment to see the response to command
print_r($output); 
C:\ApacheFlexSDK\bin\mxmlc.exe
    C:\inetpub\utils\css\sample.css 2>&1
Array ( [0] => Error loading: C:\Program Files (x86)\Java\jre1.8.0_121\bin\client\jvm.dll ) 
C:\ProgramFiles(x86)\Java\jre1.8.0\u 121\bin\client\jvm.dll
是正确的,并且这里有一个jvm.dll

当我直接从命令行运行该命令时,它工作正常,即生成一个SWF文件(mxmlc是ApacheFlex编译器)


找不到如何解决此问题,请提供帮助。

如果应用程序的参数有空格,则必须使用path或双引号将其包装到应用程序:

$cmd = 'targetapp.exe "C:\my other path with spaces\targetfile.xxx"';
exec($cmd);


$cmd = '"C:\my path with spaces\targetapp.exe" C:\mypathnospaces\targetfile.xxx';
exec($cmd);