View Full Version : Creating New Pages With PHP
Candrias77
03-19-2003, 12:55 PM
Is it possible to have php generate a brand new .php or .html page and place it in the directory on the server?
For example...
If i extracted some page information from a database into a php page, could I then tell the page to write a new file (lets say stuff.php) and put it in a directory: new/stuff.php?
Thanks.
Nightfire
03-19-2003, 01:21 PM
Yeah you can do that, but you could have stuff.php already in the /new directory, then just have that fetch all the info from the database, be the best way... but as I don't really know what you're trying to do, here's what you asked for
copy('phppage.php','new/stuff.html');
Candrias77
03-19-2003, 08:44 PM
Thanks Nightfire
What I think I need to do is make a bunch of pages, each different (depending on database variables). So I really need to open a template page, change some variables, save this as a new page in a new directory.
Any thoughts on this one?
Candrias77
03-20-2003, 04:23 AM
Hmm, this page is getting close to what I need...
http://www.codingforums.com/showthread.php?s=&threadid=2276
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.