dongshi1934 2014-04-21 18:57
浏览 54

从另一个php脚本在不同的文件夹中运行php脚本

I have web application that is running in root directory. In another directory I have some application that I want to run and get result from. So from /root/myscript.php I want to call the script /app/index.php which returns some value. The problem is that index.php also includes some scripts which are in /app folder. And because my working directory is in /root directory, this scripts does not get included.

Is there any other way I can run index.php script from myscript.php and enable index.php to include all needed files?

  • 写回答

1条回答 默认 最新

  • doujiang1832 2014-04-21 18:59
    关注

    You can include file from parent directory:

    include('../somefilein_parent.php');
    
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度