Hey everyone, i want to set up a "program" that can set up multiple pages for me. Basically for my page i need to have "tests". They are simple enough to create, but if i need to set up multiple "tests" it could take undue amounts of time. So what i want is two have a page that asks certain questions, and those questions will be posted in a certain order on a new page. But i need the program to set a new page on my website, so it actually adds pages to my directory as if i had used my WYSIWYG editor. Any ideas?
Thanks
creating new pages
Moderator: General Moderators
-
Mad0Driver
- Forum Newbie
- Posts: 10
- Joined: Tue Jan 30, 2007 4:00 pm
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
basically what you are going to do it auto-generate php code, then write that code (which is actually a string) to a file. This can get really hairy because you are auto-generating code and things can go wrong really fast.
Just have the code of the test page in a string, create a file with fopen() then write the string to the file and there you go!
Just have the code of the test page in a string, create a file with fopen() then write the string to the file and there you go!
If There is an error in your php codes and you didn't looked at it while testing
all ther visitors will face that particullar error in a Chain
and then you need to recreate all the wrong pages
so i think its a very bad idea
-----------------------------------------------------------------------
But if you think to generate the page in the fly and then delete it after compiling
then its a matter with lower risk than it was of before
but in this casa don't forget to use a .htaccess in it to make the Access Denied(Deny from All)
all ther visitors will face that particullar error in a Chain
and then you need to recreate all the wrong pages
so i think its a very bad idea
-----------------------------------------------------------------------
But if you think to generate the page in the fly and then delete it after compiling
then its a matter with lower risk than it was of before
but in this casa don't forget to use a .htaccess in it to make the Access Denied(Deny from All)