我试图通过PHP显示ngspice输出。
我能够显示终端输出,但无法显示图形。我说错了:
错误:(内部)未为显示类型printf定义此操作。无法为图形打开视图。注意:没有".plot“、".print”或".fourier“行;没有模拟运行。
THis是我的netlist文件:
*ngspice netlist*
v1 1 0 dc 5v
r1 1 0 1k
.tran 1e-03 11e-03 1e-03
.control
run
plot allv
.endc
.end 当在终端上单独执行时,会给出图形,但我无法通过PHP显示图形。我在HP中通过以下代码运行这段代码:
$output=shell_exec(‘ngspice /var/www/html/eSIM/netlist.txt 2>&1’);
发布于 2016-04-09 16:14:18
ngspice似乎没有与输出显示和/或X-服务器的连接。
启动ngspice后是否有任何错误/警告消息?
http://php.net/manual/en/function.shell-exec.php上有很多关于当您通过shell_exec启动程序时可能发生的事情的评论(例如,缺少路径条目.)。
https://stackoverflow.com/questions/33624746
复制相似问题