解决方案 »

  1.   

    另外我在linux环境下执行这个php也可以执行,
    php test.php
    但在网页上输入网址就一直是加载的状态
      

  2.   

    ll /home/test/www/bin/fcshbuild 查看是否有读写权限php  test.php 检查php环境
      

  3.   

    应该是php使用的nobody账户没有权限
    改文件权限等方法都可以
      

  4.   


    -rwxrwxrwx 1 test test 2391  4月 28  2009 /home/test/www/bin/fcshbuild*我都设置成777了
      

  5.   


    我www下用户是www-data,不是nobody,我用的是ubuntu13.04
      

  6.   

    我切换到www-data用户执行
    www-data@ubuntu:/home$ bash /home/test/www/bin/fcshserv.sh
    /home/test/www/fcsh/fcsh.vim.lock created
    [INFO] starting server.
    Adobe Flex Compiler SHell (fcsh)
    Version 4.6.0 build 23201
    Copyright (c) 2004-2011 Adobe Systems, Inc. All rights reserved.
    但我在php里写:
    <?php
    $exstr = "bash /home/test/www/bin/fcshserv.sh";
    exec($exstr,$list,$status);
    print_r($list);
    echo $status;
    ?>
    返回的就是Array ( ) 1估计是权限的问题,可我在www-data下运行是可以的啊