Forum Moderators: coopster

Message Too Old, No Replies

.php vs .html

saving as

         

teksun

4:35 pm on Jan 14, 2006 (gmt 0)

10+ Year Member



I do not yet know that much about php but am currently building a website that will need a database. Can/should I go ahead and save my pages with the .php extention or should I save them as .html and convert them later.

Anyango

5:29 pm on Jan 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you can save them both ways. If you save them as .html then you just need to tell apache that it should parse .html files as php files and then u can write any php code in .html files.

teksun

5:58 pm on Jan 14, 2006 (gmt 0)

10+ Year Member



So I can write and save my files as .html then later tell the server to parse them as php. How will that affect adding a database at a later point.

Anyango

6:03 pm on Jan 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if u tell apache to parse .html files as php then there remains no more difference in .html extension or .php extension. In simple words you will be able to do any kind of database manipulations as u want, infact u can write any, literally any php code in that .html file as you would write in .php.

The only requirement,though,is that your server should be told to parse .html as php files.

teksun

6:11 pm on Jan 14, 2006 (gmt 0)

10+ Year Member



Great News!
Thank You