【发布时间】:2015-05-15 16:51:57
【问题描述】:
我正在尝试包含一个 .php 文件,但为此我需要上两个目录,但我似乎无法使其工作。这是我的代码:
<?php include '../asset/scripts/php/portfoliohome.php'; ?>
文件结构如下所示:
C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\website\pages\index.php
我想从index.php 到website,然后我可以包含/asset/scripts/php/portfoliohome.php 中的.php。
portfoliohome.php 位置:
C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\website\asset\scripts\php\portfoliohome.php
这是我收到的错误:
警告:包括(.../asset/scripts/php/portfoliohome.php):未能 打开流:C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\website\pages\index.php 中没有这样的文件或目录 第 1 行
【问题讨论】:
-
portfoliohome.php 的完整文件系统路径是什么?
标签: php