incrediBILL - 12:59 am on Jan 7, 2012 (gmt 0)
@lostdreamer whoops, you are correct, it was late and I misread the message, in the light of a new day I see the error and the error in my interpretation of the problem.
All I know is my method would work most of the time ;)
Thanks for the heads up on dirname(__FILE__). I'm an old time programmer and well versed in CGI stuff, just newer to PHP so some of it's quirks still get past me. Hopefully soon I'll be up to speed on all the PHP nuances, quirks and annoyances but of course they'll roll out an update that'll create a whole new set about then!
s there potential risk of security in the method that you suggested?
Using my method to make an absolute path is perfectly safe.
Security issues only arise if you have to escalate file rights to 755/777 like I suggested, which is usually only a problem when writing to files and not reading. Even then the security issue is usually coming from within the server, not from the outside, so I wouldn't be too concerned unless you share a server with a bunch of hackers and if that's the case you're already in trouble!