duanjianxi8439 2014-05-02 02:53
浏览 61

融合python脚本不使用php在后台运行

i am trying to run a file sytem for dropbox ff4d ( from github) in background using php the purpose if that user will get his dropbox files mount on the server and then i will give the path to a web based explorer (like eXtplorer) so user can manage his file the script is working fine when using command shell but when i using the exec function it working printing out the last line of the command shell and that it . i can not get the folder mount here the code in php :

$folder = $_POST['foldername'];

$oldumask = umask(0000);
$path = "/var/www/cloudsite/" . $folder;

if(mkdir($path, 0777, true)) {
    echo $path . " success directory created ";
} else {
    echo $path . "error directory not created ";
}
umask($oldumask);

#$command = '/usr/bin/python /var/www/cloudsite/ff4d/./ff4d.py '. $path .'c7ZYof8Bl0YAAAAAAAAAARThZwAUexbukmv3rMEprPJWFcoQSKGWtWHQBYM40OgC';
$result = exec($command);

if ($result){
    echo " </br> execution success";

}else{
    echo "</br> error not success";
}

echo $result;

and here what i get in the browser it seems like it working but just hang here nothing mount in the created directory : var/www/cloudsite/chao success directory created execution successStarting FUSE...

  • 写回答

1条回答 默认 最新

  • doujiao8491 2014-05-12 14:54
    关注

    Within the latest release of my ff4d.py script I've added a "background" switch (-bg).

    https://github.com/realriot/ff4d

    BTW: Please remove your access key (and revoke it afterwards) because it holds your personal information and ALL your data...

    评论

报告相同问题?

悬赏问题

  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line