Is __FILE__ depreciated?
Am I correct in thinking that it contains the current scripts absolute path and when its dirname(__FILE__) it shows the absolute path to the directory in which the current script is?
I don't think it is deprecated... I use dirname(__FILE__) all the time!
What makes you think its deprecated?
No, he thinks its depreciated.
like __FILe__ or something, maybe its linked to the UK pound.
dirname( __FILE__ ) === __DIR__ in PHP 5.3
Logic without the fatal effects.
All code snippets are licensed under WTFPL.
If __FILE__ is meant to be deprecated what would be best alternate of it then?
All i asked was whether or not __FILE__ was depreciated.
I asked it because in i've never come across it during my time learning PHP.
Nope, AFAIK, it is not deprecated yet and you can fairly use it.
Originally Posted by L4DD13
you might be interested in magic constants then, and core predefined constants, which includes my favourite
(PHP End Of Line)
Which puts in the correct EOL for your OS.
echo 'a line' . PHP_EOL ;
I find it far better than "\n"; once I remembered to use it of course.
Remember for emails to use \r\n always though. \n is not valid over the SMTP protocol