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');
    
    评论

报告相同问题?

悬赏问题

  • ¥15 Matlab问题解答有两个问题
  • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架
  • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
  • ¥15 stm32的can接口不能收发数据
  • ¥15 目标检测算法移植到arm开发板
  • ¥15 利用JD51设计温度报警系统
  • ¥15 快手联盟怎么快速的跑出建立模型