| | |
PHP & File Extensions
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hi all,
I'm trying to see if this programmer knows what he is talking about.
I'm going to be changing all my files from .phtml to either .htm or .php
I have a small amount of php on my site... http://www.exoticpublishing.com
This programmer is saying that I can change it to .htm & it won't harm anything b/c there is little to no php on the site.
Another programmer is telling me NO, I have to make it .php
What do you guys think?
Thanks & TTYL
Michelle
I'm trying to see if this programmer knows what he is talking about.
I'm going to be changing all my files from .phtml to either .htm or .php
I have a small amount of php on my site... http://www.exoticpublishing.com
This programmer is saying that I can change it to .htm & it won't harm anything b/c there is little to no php on the site.
Another programmer is telling me NO, I have to make it .php
What do you guys think?
Thanks & TTYL
Michelle
Review all of our open job positions
**Parents having problems with your kids? Come tell us your story
Are you a writer or editor? Join us...
**Parents having problems with your kids? Come tell us your story
Are you a writer or editor? Join us...
In almost all cases, if a page contains no PHP code, it can have either a .php or a .htm extension. If a page does contain even one line of actual PHP code, it must have a .php extension.
To be perfectly honest though, anyone with a dedicated server can edit their Apache httpd configuration to allow any extension to be an alias for any other extension. For example, you can say that .htm and .phtml are both aliases for .php, and therefore all 3 can run PHP code. Doing this would take a system administrator / linux techie type person to make the appropriate change.
To be perfectly honest though, anyone with a dedicated server can edit their Apache httpd configuration to allow any extension to be an alias for any other extension. For example, you can say that .htm and .phtml are both aliases for .php, and therefore all 3 can run PHP code. Doing this would take a system administrator / linux techie type person to make the appropriate change.
•
•
Join Date: Aug 2004
Posts: 49
Reputation:
Solved Threads: 1
If you add the following line to your .htaccess file then files ending .html or .phtml will be treated the same as those ending .php
AddHandler server-parsed .html .phtml
AddHandler server-parsed .html .phtml
Thanks guys. I'm trying to establish if this guy really knows anything about developing web sites, or he's just a DB programmer.
Take care
Michelle
Take care
Michelle
Review all of our open job positions
**Parents having problems with your kids? Come tell us your story
Are you a writer or editor? Join us...
**Parents having problems with your kids? Come tell us your story
Are you a writer or editor? Join us...
•
•
•
•
Originally Posted by felgall
If you add the following line to your .htaccess file then files ending .html or .phtml will be treated the same as those ending .php
AddHandler server-parsed .html .phtml
http://www.example.com/index
instead of
http://www.example.com/index.htm
??
Dont forget to spread the reputation to those that deserve!
•
•
•
•
Originally Posted by Ragnarok
You can do that, but you have to tell the server to exicute that file (since it cannot be registered with a file type) I don't remember the code for this. You could also use mod_rewrite to remove the etentions off the files as well
PHP Syntax (Toggle Plain Text)
RewriteRule ^fileneame.*$ filename.php [L]
Using that line for mod_rewrite you could use anything, so if you went to filename.htm it would work, if you went to filename.file it would work, it would even work if you went to filename.thisisareallygreatwebsite .
Just remove the "." to make it only work at filename with no extension

YOungCoder
Class Info:
Warrior Priest | Bright Wizard |Witch Hunter | Rune Priest |Engineer | Hammerer |Ironbreaker | Black Orc |Orc Choppa | Goblin Shaman |Squig Herder | Chosen |Magus | Zealot | Marauder
Warrior Priest | Bright Wizard |Witch Hunter | Rune Priest |Engineer | Hammerer |Ironbreaker | Black Orc |Orc Choppa | Goblin Shaman |Squig Herder | Chosen |Magus | Zealot | Marauder
•
•
•
•
Originally Posted by ep2002
This programmer is saying that I can change it to .htm & it won't harm anything b/c there is little to no php on the site.
Other than that, I would say pretty much the same thing everyone else said with extra mayo.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
<sigh>
I don't know what he is.
He claims to have worked as a VP of a large company & his background is with DBs & he knows PHP.
I started getting worried when a few things didn't make sense, then this issue & now today another issue.
My problem is, he knows my user names & p/wds on some of my pages & since he was to be a suedo partner, I'm nervous, but I have to cut my ties. I can't keep wondering whether he really knows what he's talking about. :o
Wish me luck as I have a midnight meeting w/ him.
Michelle
I don't know what he is.
He claims to have worked as a VP of a large company & his background is with DBs & he knows PHP.
I started getting worried when a few things didn't make sense, then this issue & now today another issue.
My problem is, he knows my user names & p/wds on some of my pages & since he was to be a suedo partner, I'm nervous, but I have to cut my ties. I can't keep wondering whether he really knows what he's talking about. :o
Wish me luck as I have a midnight meeting w/ him.
Michelle
•
•
•
•
Originally Posted by inscissor
Is he a logo programmer? An HTML programmer? People really abuse the heck out of that title. In all honestly, any decent programmer will tell you that there will be a change in your web pages even if you have the smallest amount of PHP code on your page.
Other than that, I would say pretty much the same thing everyone else said with extra mayo.
Review all of our open job positions
**Parents having problems with your kids? Come tell us your story
Are you a writer or editor? Join us...
**Parents having problems with your kids? Come tell us your story
Are you a writer or editor? Join us...
![]() |
Similar Threads
- Master & custom php.ini file considerations (Linux Servers and Apache)
Other Threads in the PHP Forum
- Previous Thread: how to find stock information with php script
- Next Thread: shopping website
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dropdown dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube







