Page 1 of 1

Calling PHP files.

Posted: Thu May 28, 2009 6:34 pm
by lpiekarski
Hello Everyone!

Ive been working with php for a while, i have a genereal question about naming the files and calling them in url.
Ex. i have a file called edit.php and file index.edit.php

i can call both files no problem theyre working fine using.
http://domain/edit.php and i call the other http://domain/index.edit (without the.php extension)

So my question is is the second example wrong will i encounter any problems further down the road ?? is the extension on the end necessery ?

Re: Calling PHP files.

Posted: Thu May 28, 2009 6:57 pm
by mischievous
well... later down the road there might be a file that has the same naming convention but with a different file extension and that would run into a problem? I would use best practice to call the file with the extension IMO :dubious:

Re: Calling PHP files.

Posted: Thu May 28, 2009 7:00 pm
by lpiekarski
Thank you for fast replay, but for small applications that wont be expanded it wouldn't creat any problems ?

Re: Calling PHP files.

Posted: Fri May 29, 2009 7:39 am
by lpiekarski
McInfo

Heres the version im using: Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0

I did not add any special Rewrite For it to work. Everything is pretty much by default exept few minor changes which wouldnt affect that. On all of my server this works without any problems.
All my files they have .php extensions but in the url i dont use it hope this helps.

** On one of the hosting servers that i use and pay for, this doesn't work. So let me look in to that.
*** I have looked through the configs of apache and php and only thing i could find that cought my eye was "allow_url_fopen On" im not sure what this does but on the servers that it workd this is on and on the one that it doesnt work on, the setting is off.