Jump to content

replacing .php extension with .html


teedoff

Recommended Posts

Hi first post here and very new to php. I built a form so that a data entry perosn can "build" new pages for our companies website. I pretty much have the basics of the form and the action page coded correctly, however my issue is that I need this final page where the form inputs are posted too to be an html document.

 

I read some about the str_replace() function, but I'm not understanding how I could use that to replace the file extension of a page.

 

Maybe I'm going about this all wrong. I also read that one can edit the htaccess folder to allow an html file to run php script. Not sure which way would be the best. One thing to mention though, is this application would be run locally to our back up files which is then scheduled to be uploaded to the remote server very night.

 

Any help or suggestions would be greatly appreciated.

Link to comment
Share on other sites

Yes it is somewhat a CMS. Again, I pretty much have it working like I want. The issue is I would like the newly created pages to be somehow saved as .html files.

 

I tried using dreamweaver templates, but the problem with those are that as far as I know you cant set up editable regions to edit meta content.

 

Another issue that arose was the ability to edit har coded shopping cart inputs, but thats another topic for later.

Link to comment
Share on other sites

Any other suggestions?

 

Again I have a form that works pretty much exactly how I want. This form add values to specific html elements in the formResultsPage.php. The problem is, with my employer wanting all pages as .html documents only. how do I go about saving the forResultsPage.php to someFile.html after the data has been added to the html elements.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.