Autogenerate new pages?
Posted: Wed Nov 07, 2007 4:57 pm
Hi all,
I am pretty new to PHP - have just been learning the basics thus far, and how to interact with mysql. It seems a very powerful language, and I want to learn alot more
Question - with PHP, is there anyways to autogenerate pages of a website? And when I say autogenerate I do not mean passing something into the URL using the same 'page template', I mean actully creating a new file that will be called its own name, such as http://www.mysite.com/newpagecreated.php , http://www.mysite.com/anotherpageIcreated.php etc..? (Opposed to something like http://www.mysite.com/somepage.php?page=newpage , http://www.mysite.com/somepage.php?page=anotherpage)
From reading so far I would imagine it would be sort of possible by writing to a new file when a new page is wanting to be created which is saved in the correct folder, maybe by passing a string into it containing the code for that new made page, unless there is a simpier way?
Reason I ask is because I wanted to know if I could create a site where users can easily add pages themselves via an admin area, and then choose what content is displayed, i.e a content managment system with also auto made pages incase they decide they wanted to add another page.
Hope the above makes sense. I know it will likely be hard to code (and I may not be at the level to do so), but just seeing if it was possible to do.
Many thanks
I am pretty new to PHP - have just been learning the basics thus far, and how to interact with mysql. It seems a very powerful language, and I want to learn alot more
Question - with PHP, is there anyways to autogenerate pages of a website? And when I say autogenerate I do not mean passing something into the URL using the same 'page template', I mean actully creating a new file that will be called its own name, such as http://www.mysite.com/newpagecreated.php , http://www.mysite.com/anotherpageIcreated.php etc..? (Opposed to something like http://www.mysite.com/somepage.php?page=newpage , http://www.mysite.com/somepage.php?page=anotherpage)
From reading so far I would imagine it would be sort of possible by writing to a new file when a new page is wanting to be created which is saved in the correct folder, maybe by passing a string into it containing the code for that new made page, unless there is a simpier way?
Reason I ask is because I wanted to know if I could create a site where users can easily add pages themselves via an admin area, and then choose what content is displayed, i.e a content managment system with also auto made pages incase they decide they wanted to add another page.
Hope the above makes sense. I know it will likely be hard to code (and I may not be at the level to do so), but just seeing if it was possible to do.
Many thanks