dazz_club Posted September 5, 2006 Share Posted September 5, 2006 Hi guys,is it possible to create new html pages using php.heres what i would like to do:im in the process of creating several pages that are basicly the same but all that differs is the content/text and images. so i think for this i need some sort of template, as the layout never changes.So what i would like to do is possibly have a editing page thats online somewhere, like in an admin part where all i do is create new text, upload the images and press a magic button and it creates a new html page with the new changes that ive ammended.im thinking a CMS but is it possible to publish/create new html pages, not just edit original pages.is this possible?cheers Link to comment Share on other sites More sharing options...
aspnetguy Posted September 5, 2006 Share Posted September 5, 2006 yes you just create a file with the .html extension, basic IO Link to comment Share on other sites More sharing options...
dazz_club Posted September 5, 2006 Author Share Posted September 5, 2006 basic IO, is that java?thanks for your reply Link to comment Share on other sites More sharing options...
aspnetguy Posted September 5, 2006 Share Posted September 5, 2006 no IO stands for Input/Output sorry :)look at this http://www.tizag.com/phpT/filecreate.php Link to comment Share on other sites More sharing options...
dazz_club Posted September 5, 2006 Author Share Posted September 5, 2006 oh, basic I/O cheers, i originaly thought "IO" was one of those smiley faces, but not obviously smiling, lol,cheers Link to comment Share on other sites More sharing options...
dazz_club Posted September 5, 2006 Author Share Posted September 5, 2006 Great tutorial!!!cheers for that mate. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 5, 2006 Share Posted September 5, 2006 i originaly thought "IO" was one of those smiley faces, but not obviously smiling, lol,It's Geordie LaForge from Star Trek being shocked. Link to comment Share on other sites More sharing options...
reportingsjr Posted September 5, 2006 Share Posted September 5, 2006 ROFL justsomeguy . Yea, the dude with the cool eye sunglass thing. , I would look into file I/O if I were you, pretty helpful in a few situations. (Dont use it to create a counter! Stupid people go to your site and dont even wait for it to finish loading before they leave, therefore leaving you with a blank file -.- ) Link to comment Share on other sites More sharing options...
dazz_club Posted September 6, 2006 Author Share Posted September 6, 2006 lololoololololololdont worry, i`ll read in to it, thanks for your advice guys. Link to comment Share on other sites More sharing options...
dazz_club Posted September 7, 2006 Author Share Posted September 7, 2006 Hi guys, backiv read up and done my research, now im creating html files.how it works is that it overwrites the existing content of the newhtml page. Now if possible, i would like to the newhtml.page to have a certain look all the time and only want the text to change or image.so would like to set up the newpage.html to catch the data and place where i say, so kinda like having variables there that are replaced with what want i would like it to say saying. This is so i know where is going rather than just overwriting the whole page.did i make any sense?hope i did.cheers Link to comment Share on other sites More sharing options...
justsomeguy Posted September 7, 2006 Share Posted September 7, 2006 You can use a regular expression to search for a specific thing in the page and replace it with something else. So you can search for a specific div element or something:<div id="replace">...</div>and replace that with what you want. If you want to replace specific elements, put an ID on them and use a regular expression to find and replace them. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now