Ask a Question related to PHP Development, Design and Development.
-
Cyz #1
RE: [PHP] Problem occurs when included file includes anther file.
Thank you for your reply first.
Yes I know I could set include_path either in the php.ini or at
runtime.But it's a little bit dirty I think.What I am confused about is
the fact that
require("./inc.php") can not work while require("inc.php"); works
correctly. How does php determine the include_path in this kind of
situation?
-----Original Message-----
From: Nicholas Robinson [mailto:npr@bottlehall.freeserve.co.uk]
Sent: Friday, August 08, 2003 2:54 PM
To: CaiYongzhou; Php General
Subject: Re: [PHP] Problem occurs when included file includes anther
file.
You can set the path(s) in php.ini
Edit the file and search on 'include'
HTH
Nick
On Friday 08 Aug 2003 6:38 am, CaiYongzhou wrote:> The directory structure is as follows:
> /
>
> |-- demo.php
> |-- inc/
> |
> |-- inc1.php
> |-- inc2.php
>
> === file demo.php ==
> <?php
> require 'inc/inc1.php';
> ?>
>
> === file inc/inc1.php ==
> <?php
> require 'inc2.php';
> ?>
>
> == file inc/inc2.php ==
> this is a test
>
> The above inc/inc1.php is ok for testing.And this would be ok too:
> <?php
> //file inc/inc1.php
> require 'inc/inc2.php';
> ?>
>
> Problem occurs when the code is like this
> <?php
> //file inc/inc1.php
> require './inc2.php';
> ?>
> Fatal error: main(): Failed opening required './inc2.php'
> (include_path='.:/usr/local/lib/php')
>
> It seems that there's no explanation about this in php manual.Could
> someone give some?
>
> Btw,I am using redhat 7.2 / Apache 2.0.47 / PHP 4.3.3RC1 as my testing
> server.
> Thank you for reading my post:)
Cyz Guest
-
Looking for a simple .w3d file with bones included
Hi, I would like to test #BONESPLAYER , but I have no .w3d files with bones. I plan on buying shockwave avatars from www.geo-metricks.com... -
BIG file sizes with ICC included
I just noticed this after fixing up my color settings and icc profile. When i save an AI CS file, and have "include ICC profile" checked in the... -
Problem occurs when included file includes anther file.
The directory structure is as follows: / |-- demo.php |-- inc/ |-- inc1.php |-- inc2.php === file demo.php == <?php require 'inc/inc1.php'; -
Check if php file is an included file?
If have file1.php that includes file2.php, is there any way to check, from file2.php, if it is indeed included. In other words, I don't want... -
[PHP] Check if php file is an included file?
On Tuesday 15 July 2003 15:25, John Manko wrote: get_included_files() -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source...



Reply With Quote

