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
https://forums.phpfreaks.com/topic/218789-replacing-php-extension-with-html/
Share on other sites

I only meant to address this:

 

I also read that one can edit the htaccess folder to allow an html file to run php script.

 

It sounds like what you are describing is a content management system (CMS), which can be a rather complex system and a very broad topic.

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.

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.

Archived

This topic is now archived and is closed to further replies.

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