Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

finding the physical path of an include file when parsing
How do I find the path to an include file from inside the file when loaded?
The file is located above the doc root. The script which includes the file
is located in the doc root. The included file needs to include additional
files located in the same directory as itself. I am trying not to have to
edit the php.ini include_path or to set it at run-time using set_ini().

Any help would be appreciated. thanks

Patrick



Report this thread to moderator Post Follow-up to this message
Old Post
advertis
10-23-04 01:55 AM


Re: finding the physical path of an include file when parsing
advertis wrote:

> How do I find the path to an include file from inside the file when
> loaded? The file is located above the doc root. The script which includes
> the file is located in the doc root. The included file needs to include
> additional files located in the same directory as itself. I am trying not
> to have to edit the php.ini include_path or to set it at run-time using
> set_ini().
>
> Any help would be appreciated. thanks

realpath(__FILE__) will give you the full real path name to the current
file.

http://www.php.net/realpath

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Hope
10-23-04 01:55 AM


Re: finding the physical path of an include file when parsing
Works Great! thanks

"Chris Hope" <blackhole@electrictoolbox.com> wrote in message
news:1098485052_35193@216.128.74.129...
> advertis wrote:
> 
includes 
not 
>
> realpath(__FILE__) will give you the full real path name to the current
> file.
>
> http://www.php.net/realpath
>
> --
> Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/



Report this thread to moderator Post Follow-up to this message
Old Post
advertis
10-23-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:37 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.