Calling PHP files.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lpiekarski
Forum Newbie
Posts: 4
Joined: Thu May 28, 2009 6:28 pm

Calling PHP files.

Post 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 ?
mischievous
Forum Commoner
Posts: 71
Joined: Sun Apr 19, 2009 8:59 pm

Re: Calling PHP files.

Post 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:
lpiekarski
Forum Newbie
Posts: 4
Joined: Thu May 28, 2009 6:28 pm

Re: Calling PHP files.

Post by lpiekarski »

Thank you for fast replay, but for small applications that wont be expanded it wouldn't creat any problems ?
lpiekarski
Forum Newbie
Posts: 4
Joined: Thu May 28, 2009 6:28 pm

Re: Calling PHP files.

Post 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.
Post Reply