dongxiaoguang9108 2010-05-10 16:31
浏览 24
已采纳

PHP系统()帮助

I have this shell script

    #!/bin/sh

#############################################################
# Example startup script for the SecureTrading Xpay4 client #
# Install Xpay4 into /usr/local/xpay4                       #
# To run this script automatically at startup, place the    #
# following line at the end of the bootup script.           #
# eg. for RedHat linux: /etc/rc.d/rc.local                  #
#                                                           #
# /usr/local/xpay4/xpay4.sh                                 #
#############################################################

# Configuration options

# Path to java executable
JAVAPATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

########## Do not alter anything below this line ##########
echo "Starting Xpay4. Please ensure the Xpay4 client is not already running"
$JAVAPATH/java -jar /usr/local/xpay4/Xpay4.jar /usr/local/xpay4/xpay4.ini &

And I am trying to run it using,

system("/x/sh/shell.sh");

I am doing this when a user navigates to a certain page on my site, however I am getting just a white blank screen is there a way to error check with system(), I am currently using

error_reporting(E_ALL | E_STRCIT)

and that is applied site wide

  • 写回答

4条回答 默认 最新

  • douzhang1115 2010-05-10 16:44
    关注

    You might also try displaying the output from your script in case there is some issue with calling it from php:

    system("/x/sh/shell.sh", $output); echo $output;

    Hopefully that will give you a more interesting output.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
  • ¥20 关于URL获取的参数,无法执行二选一查询
  • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集