471,306 Members | 850 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 software developers and data experts.

[Fwd: Problem with __FILE__ magic constant]

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
1 2346
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.

Similar topics

reply views Thread by Chris Pomasl | last post: by
6 posts views Thread by Tom | last post: by
9 posts views Thread by qazmlp | last post: by
19 posts views Thread by youpak2000 | last post: by
18 posts views Thread by Lukas Ruf | last post: by
46 posts views Thread by lovecreatesbea... | last post: by
4 posts views Thread by allan.mcrae | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.