简体   繁体   English

Windows中的PHP执行octave sh

[英]PHP exec octave sh in Windows

I'm trying to execute the following octave sh file in php using the exec command running in Windows 2008. This command works in Unix but I don't know why it doesn't work in Windows. 我正在尝试使用Windows 2008中运行的exec命令在php中执行以下octave sh文件。该命令在Unix中有效,但我不知道为什么它在Windows中不起作用。 Seems that the working directory of Octave is C:\\Windows\\system32\\config\\systemprofile Please advice. 似乎Octave的工作目录是C:\\ Windows \\ system32 \\ config \\ systemprofile请咨询。

exec("octave ./d_test.sh");

Solved :) I edited the octaverc in 'c:\\software\\Octave\\Octave3.6.2_gcc4.6.2\\share\\octave\\site\\m\\startup' with 解决:)我使用以下命令在'c:\\ software \\ Octave \\ Octave3.6.2_gcc4.6.2 \\ share \\ octave \\ site \\ m \\ startup'中编辑了octaverc

addpath("C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\test");
addpath("C:\\Windows\\system32\\config\\systemprofile")
##cd(getenv('USERPROFILE'))

You're better off just figuring out where octave is and calling it using that absolute path, ex. 最好只弄清楚八度音位在哪里,并使用该绝对路径调用它,例如。 exec("C:\\Octave-3.6.1\\bin\\octave.exe ./d_test.sh"); .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM