【发布时间】:2010-12-25 16:47:05
【问题描述】:
我正在从事的当前项目的结构类似于:
- root/index.php
- root/includes/php/first.php
- root/includes/php/functions.php
所以 index.php 包含 first.php:
<?php include_once("includes/php/first.php"); ?>
通常我的 first.php 会调用如下函数:
<?php include_once("includes/php/functions.php"); ?>
假设亲戚仍然来自索引页面,但是当移动到新服务器时它不起作用。我尝试从 first.php 制作相对路径:
include_once("functions.php");
这似乎现在可以工作了。
这通常是正确的方法?我想推出这个项目,这样几乎任何人都可以安装它。
【问题讨论】:
标签: php apache include directory