PDA

View Full Version : File Extensions (basic tip)


Deb
12-26-1998, 01:52 AM
Just cuz I didn't know when I started.. figured I'd share it here also (if I send out helpful tips I'll receive helpful tips right? *g*)

I know on the PHP3 home page in the beginners tutorial, and about everywhere else I look, they say to use .php3 as the file extension... the thing I do not like about that is when they upgrade to php4 .. will it ruin what we already have?

Sooooo.. Since Terra has added the .php extension that's what I've chosen to use...
.php3 or .php will work the same.

If you name the file with a .phps extension you will be able to easily view/show the source, all color coded and pretty http://www.aota.net/ubb/smile.gif

Deb

------------------
Unlocking the Power of the Internet!
www.FutureQuest.net (http://www.FutureQuest.net)

JoeCD
12-26-1998, 03:33 AM
LOL. Now that's a good thing to hear. I was actually thinking about that earlier, and wondered why they used .php3 for something that is upgradable. It would probably be a pain for everyone to rename files when they upgrade. A few pages is one thing, but suppose someone decided to re-design their whole site using PHP 3, and it was over 300 pages. gasp.

Yep, Deb and Terra thinking of those potential problems before we do. That FutureQuest name really fits.

Happy Holidays



------------------
Joe

Terra
12-26-1998, 04:24 AM
After thinking about this for a moment...

.php3 would always be recognizable by the server as a PHP3 page...

I'm thinking that when .php4 becomes a reality - perhaps they are going to use that as a mechanism in the PHP4 engine to switch on the *new* capabilities - while utilizing .php3 to *signal* the engine that this is a legacy page, therefor special handling is required...

This is how it makes sense to me, and there are places in my own code that I use these types of *signals* to switch modes for compatibility...

The PHP4 engine *should* be backwards compatible with PHP3 without any special file extension - but you just never know...

Something to be aware of...

--
Terra
sysAdmin
FutureQuest

hearts
12-26-1998, 07:19 PM
and i thought the "3" referred to PHP3 being the combination of 1)Perl, 2)Java, and 3)C concepts .. http://www.aota.net/ubb/wink.gif

Deb
12-27-1998, 02:29 PM
[nbsp]
[This message has been edited by Deb (edited 07-19-99)]