Jump to content

[SOLVED] How to Generate Pages on the Fly with PHP?


AKalair

Recommended Posts

Hello,

I'm trying to create a threaded discussion site using PHP. Currently all the titles and messages are stored in a database. I want to be able to create pages automatically when someone posts a message with a new title. So for example if someone posted a message with the title "Cheese" I want a page called "/cheese" to be made where it lists all the messages with the cheese title.

 

 

How can I do this?

 

Thanks

if i am correct, you mean you want to write a page on the fly title (for example) cheese.php, or cheese.htm?  the way to do this is with php function fputs() or fwrite(). 

 

the syntax is :

fwrite($filename, "sometext"), where some text can be text in quotes or text stored in a variable. then when replies to "cheese.php" are necessary, you can append or rewrite the page as you see fit...hope that helps

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.