SunQuest
           Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 11th, 2003, 11:51 AM
overclocker23 overclocker23 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 overclocker23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
.html to .php

Hey,
Right now I have about 185 webpages for my site and they are growing extremely fast. I am also using Dreamweaver right now to work on site since I have very minimal knowledge of databases. Since the site is growing so fast I want to convert it to a database format so it is easy to organize. I was talking to someone and he told me that to convert the site to database I must have all the pages as .php instead of .html

I can make my future webpages in .php and it is not a problem.



Do you guys suggest that I should make my future webpages to .php so it will be easier to convert to a database driven site in the future or not? Thanks a lot.

Reply With Quote
  #2  
Old October 11th, 2003, 11:51 PM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 18
If you set the server up to treat .html files as .php files it doesn't matter if they're .html or .php


Believe me, when it comes to converting a site from static to dynamic it doesn't matter how well you prepare, things are tough. The best advice is to do it is as soon as possible. The longer you wait the harder it will become to switch.
__________________
- Sorted!

www.ppfuk.com - Free Photo Sharing

Reply With Quote
  #3  
Old October 15th, 2003, 05:15 AM
ebloggy ebloggy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 123 ebloggy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 44 m 54 sec
Reputation Power: 5
How would you treat the .html file as a .php file?
__________________
free blog | free blogs

Reply With Quote
  #4  
Old October 15th, 2003, 10:45 AM
drgroove's Avatar
drgroove drgroove is offline
pushing envelopes, not pencils
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Feb 2002
Posts: 6,224 drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 4 h 34 m 57 sec
Reputation Power: 174
Re: .html to .php

Quote:
Originally posted by overclocker23
Hey,
Right now I have about 185 webpages for my site and they are growing extremely fast. I am also using Dreamweaver right now to work on site since I have very minimal knowledge of databases. Since the site is growing so fast I want to convert it to a database format so it is easy to organize. I was talking to someone and he told me that to convert the site to database I must have all the pages as .php instead of .html

I can make my future webpages in .php and it is not a problem.



Do you guys suggest that I should make my future webpages to .php so it will be easier to convert to a database driven site in the future or not? Thanks a lot.


PHP is only one options for creating a database-driven website (though it is the most popular by far).

If you're interested in learning how to create a dynamic website using PHP and MySQL (this would be the database), I recommended getting this book - it'll walk you through the steps necessary to achieve what you're talking about.
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever.
Analyze twice; hack once.
The world's first existential ITIL question: If a change is released into production without a ticket to track it,
was it actually released?


About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect -
Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire


Reply With Quote
  #5  
Old October 17th, 2003, 02:52 AM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 18
To treat a .html file as a .php file you need to make the server send .html files to the php engine. For files that don't include php code there will be no apparent change, maybe a little extra time overhead.

Reply With Quote
  #6  
Old February 28th, 2004, 01:32 AM
foggysps foggysps is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 foggysps User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile How to Convert a HTML Website to PHP

There is an easier way than re-naming all of your '.htm' page to '.php'... but still using PHP. Create a file in notepad called .htaccess with this line "AddType application/x-httpd-php .htm .html" (no quotes) and upload it to the root directory of your website, make sure it's named '.htaccess'

This tells your website server to look for any .htm or .html pages and treat them as if they where a .php page... all without even renaming you pages!

You don't even have to update your links, all of your .html or .html pages should be able to run PHP now.

Reply With Quote
  #7  
Old March 9th, 2004, 04:00 AM
c444l c444l is offline
contains a pressurised widget
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: NC USA
Posts: 401 c444l User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 41 sec
Reputation Power: 5
Send a message via AIM to c444l Send a message via Yahoo to c444l
To reply to the original poster..

ignore the discussion here about the server treating files with a .html extension as a php file. That is a tagent not related to what you were asking.

To write a database-driven site would involve more than have all of your pages written in php. There are new considerations to make as far as construction. Instead of hundreds of pages, you could end up with only four or five pages.. it just depends on what you are doing with them.

Writing the page in PHP now without a database behind it will not prepare the site for when it is database driven.. it would, however, be pretty good practice for you.

listen to drgroove..

Reply With Quote
  #8  
Old March 9th, 2004, 04:30 AM
Executive's Avatar
Executive Executive is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 147 Executive User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Would SSI be considered? I usually have a top and bottom include file that contain everything except the content on that page. I can change virtually everything (header, menu, footer) with one file.
__________________
Family Hosting, we treat you like family!
United Web Site Award Givers, is your website worthy of an award?

Reply With Quote
  #9  
Old March 12th, 2004, 03:23 AM
c444l c444l is offline
contains a pressurised widget
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: NC USA
Posts: 401 c444l User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 41 sec
Reputation Power: 5
Send a message via AIM to c444l Send a message via Yahoo to c444l
Executive: what?

Reply With Quote
  #10  
Old March 12th, 2004, 04:50 AM
Executive's Avatar
Executive Executive is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 147 Executive User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I was just thinking SSI may be another option for you.

Reply With Quote
  #11  
Old March 25th, 2004, 05:06 PM
JunkCookie JunkCookie is offline
Vote Libertarian
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: N'wallins
Posts: 277 JunkCookie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 27 sec
Reputation Power: 6
FYI:

He's talking about Server Side Includes, which is an older method of producing dynamic content. Pages that end in .shtml are probably using SSI.
__________________
  • "Write programs as if the most important communication they do is not to the computer that executes them but to the human beings who will read and maintain the source code in the future" - ESR, The Art of UNIX Programming
  • "Programs must be written for people to read, and only incidentally for machines to execute." - Abelson & Sussman, SICP, preface to the first edition
  • "Programs must be written for machines to execute or else you just have a boring book" - DaWei_M
  • Vote Libertarian

Reply With Quote
  #12  
Old March 25th, 2004, 05:28 PM
marron79's Avatar
marron79 marron79 is offline
Rut row Raggy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: Tornado Alley
Posts: 558 marron79 User rank is Private First Class (20 - 50 Reputation Level)marron79 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 h 41 sec
Reputation Power: 8
Using SSI, you can also include a php script in a html file, much like you would a CGI-based counter.

<!--#include virtual="path/to/phpscript.php"-->

It even works with queries like...

<!--#include virtual="path/to/phpscript.php?var1=something"-->
__________________
Matt

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > .html to .php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |