Forum Moderators: coopster

Message Too Old, No Replies

Newbie question on predefined constants

         

astinov

6:48 pm on Jan 13, 2005 (gmt 0)

10+ Year Member



Hi,
I'm new to php and I'm trying to learn by example. I'm trying to get this to work :

echo "<br>this file is "._FILE_;

but it returns:

Notice: Use of undefined constant _FILE_ - assumed '_FILE_' in ...etc

The way I understand it is that this predefined constant is no longer suported in php or it has different syntax? Or do i just have some sort of a syntax error that i just fail to notice?

Thanks for the help....

eggy ricardo

6:53 pm on Jan 13, 2005 (gmt 0)

10+ Year Member



I think it is __FILE__ isn't it? (as in double underscore before and after)

Hope this helps
Cheers
Richard

coopster

7:30 pm on Jan 13, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I think you're right ;) Magic constants [php.net]

And welcome to WebmasterWorld, astinov.

astinov

8:29 pm on Jan 13, 2005 (gmt 0)

10+ Year Member



Thanks guys!
I thought it was some syntax mistake, I just couldn't find what it was.