By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 2,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

[Fwd: Problem with __FILE__ magic constant]

P: n/a
Does no one have any insight?......please?

Chris

-------- Original Message --------
Subject: Problem with __FILE__ magic constant
Date: Tue, 06 Jan 2004 16:43:41 GMT
From: Chris Pomasl <po**********@starband.net>
Organization: Starband Communications
Newsgroups: comp.lang.php

We picked up a helpdesk script from sourceforge, Mantis. This script
uses the __FILE__ magic constant to ostensibly derive the path to the
include directory from a script in the top level directory.

Reading the doc about __FILE__ did not gain me enough insight as to what
is going on.

My testbed is running PHP 4.1.0 but the server where it is to run is
4.0.6. The script specifically says that it is designed for a minimum
4.0.6.

In 4.1.0, the __FILE__ constant is set to the full path to the running
script starting from the root:
/home/mydirectory/public_html/mantis/script.php
In 4.0.6, the __FILE__ constant is set to only: /script.php

My question is regarding the history of __FILE__ between these releases
and whether there is any way to influence what is returned by __FILE__?
I could change the script for our purposes but before I even think of
that, I was wondering if there were PHP options that affect this behavior.

As far as upgrading the 4.0.6 to a higher release, I could ASK but the
server is not mine (or I'd likely be at the 4.3.x level.)

TIA,
Chris

--
Christopher J. Pomasl Starband 360, 004/68 Suse Linux 8.0 + KDE 3.1.2
Bari, Sound of the Rockies Chorus Lead, Gimmick quartet
Senior Software Engineer - DB2 products Computer Associates, inc
Always remember, you are unique.....just like everyone else!!
To email me, remove the spam stuff from my eddress

--
Christopher J. Pomasl Starband 360, 004/68 Suse Linux 8.0 + KDE 3.1.2
Bari, Sound of the Rockies Chorus Lead, Gimmick quartet
Senior Software Engineer - DB2 products Computer Associates, inc
Always remember, you are unique.....just like everyone else!!
To email me, remove the spam stuff from my eddress
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 09 Jan 2004 19:52:19 GMT, Chris Pomasl <po**********@starband.net>
wrote:
Does no one have any insight?......please?

Chris

-------- Original Message --------
Subject: Problem with __FILE__ magic constant

http://bugs.php.net/search.php?cmd=d...h_for=__FILE__

... looks like a good place to start.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.