hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : How can I make customized web pages using PHP?
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

How can I make customized web pages using PHP?

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-03-2002, 07:41 PM
Tulkas Tulkas is offline
Newbie
 
Join Date: Oct 2002
Posts: 5

How can I make customized web pages using PHP?


I already have a form where the user inputs news, articles and such and then encodes the info in the database. Then I can access the info by querying the database and show it to a page that accesses the database ("readsection.php?article=1&page=2")

But now Im thinking of making every article and news into a totally different page like (readsection-1-4-2002.html).

Is there a way to do this with PHP?

Reply With Quote


Sponsored Links
  #2  
Old 11-03-2002, 07:48 PM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
Yes however not necessarily quite like that.

Using a nifty feature on apache and mod_rewrite you can do

domain.com/readsection/article/1/page/2/

or something like that

where readsection is your PHP file without the .php and then you just work out from the query string the relevant ids.

Reply With Quote
  #3  
Old 11-03-2002, 07:48 PM
MarkIL MarkIL is offline
Aspiring Evangelist
 
Join Date: Jul 2002
Location: Israel
Posts: 351
Uhmm, sure. You could just run a query, say, every hour that extracts the news and articles from the DB and generates standalone HTML files.

Shouldn't be too hard.

EDIT: Or you could follow the previous poster's advice

__________________
C#/C++/TCL/Python/PHP developer.
mark at mark org il

Reply With Quote
Sponsored Links
  #4  
Old 11-04-2002, 05:22 AM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
On the subject of removing file extensions and being able to use .htaccess to tell Apache it's a php file... has anyone yet figured out how to do the same on IIS... I've looked and looked and looked... searches, msdn, technet... not there.

Reply With Quote
  #5  
Old 11-04-2002, 08:30 AM
jtrovato jtrovato is offline
Aspiring Evangelist
 
Join Date: Aug 2002
Location: Long Island
Posts: 427
I'll tell you, I do like IIS but!! I have notice that it's so much easier to do things with apache...

You could create .html file with php and store them on the server in any folder configuration you would like. You would have to create an ASCII file and basically write to that file all the html tags and then save it as anything you would like.

Although I feel that one of the purposes of PHP is to have dynamic HTML from one .php file. This way you save space and it's truly dynamic. I'm not sure the reason behind the static pages but I'm sure you have a good one.

John

__________________
John Trovato
In Office Networks, LLC
Programmer, Cisco Network Engineer, Roofer, Biochemist, and Conductor.

Reply With Quote
  #6  
Old 11-24-2002, 09:15 PM
Gigabean Gigabean is offline
Junior Guru Wannabe
 
Join Date: Sep 2002
Location: TX
Posts: 30
[URL=http://gigabean.com]Gigabean.com[/URL]

Sorry, wrong forum.

__________________
Curtis
sales@gigabean.com
http://gigabean.com
979-575-8449

Reply With Quote
  #7  
Old 11-24-2002, 09:34 PM
beowulfdk beowulfdk is offline
WHT Addict
 
Join Date: Nov 2002
Posts: 163
Benefit of .html / .shtml static interface: Search engines more willing to index your site (better page ranking I think, and some search engines just dont index an url with ? in it)

Benefit of using an apache rewrite to make it appear your site contents is static files: Easy!

Benefit of generating the whole site as static html pages: The two above + less CPU time load.

Ofcourse the last option requires quite a bit more programming (and there is some issues regarding file permissions that has to be set/handled properly,+ it uses more discspace), but for sites with HUGE amounts of traffic it can greatly reduce CPU load. One downfall is that it isn't really a good solution if your contents is changing constantly, then one should use the rewrite solution or queries.

my 2 cents.

Reply With Quote
  #8  
Old 11-25-2002, 06:03 AM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
Quote:
Originally posted by jtrovato
I'll tell you, I do like IIS but!! I have notice that it's so much easier to do things with apache...
I know, but you don't always get the choice when it's not your decision to make. (I use both Apache and IIS BTW).

However what I want to know is how to remove a file extension from a file and still execute it as PHP. In Apache this is incredibily simple, however I cannot find any documentation on how to do the same on IIS.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Blog Platform Squarespace Launches Integrated Ecommerce Solution Web Hosting News 2013-02-15 11:35:54
Canadian Web Host BlackSun Launches Customized Dedicated Servers Web Hosting News 2012-05-28 14:35:45
Google+ Business Pages – Implications for Search Marketing Blog 2012-01-25 09:58:46
Hosting Provider HostPapa Partners with goMobi to Offer Mobile Website Builder Web Hosting News 2011-06-14 20:03:36
Yellow Pages Subsidiary Partners with Rackspace, Environmental Groups Web Hosting News 2011-06-03 16:23:27


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?