# php script to update HTML file(s)

**URL:** <https://www.phphelp.com/t/php-script-to-update-html-file-s/21469>\
**Category:** Code Snippets\
**Created:** [November 6, 2013, 6:57pm UTC](https://www.phphelp.com/t/php-script-to-update-html-file-s/21469 "2013-11-06T18:57:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.k](https://www.phphelp.com/letter_avatar_proxy/v4/letter/j/d07c76/32.png) [@j.k](https://www.phphelp.com/u/j.k)\
**Post date:** [November 6, 2013, 6:57pm UTC](https://www.phphelp.com/t/php-script-to-update-html-file-s/21469/1 "2013-11-06T18:57:48Z")

</div>

Are there some sort of php scripts. that way, I would only have to update one HTML file instead of 1000s which all locate in my web site. 🙂

Thanks in advance

---

<div class="post-metadata">

**Author:** ![JimL](https://www.phphelp.com/user_avatar/www.phphelp.com/jiml/32/1842_2.png) [@JimL](https://www.phphelp.com/u/JimL)\
**Post date:** [November 6, 2013, 6:59pm UTC](https://www.phphelp.com/t/php-script-to-update-html-file-s/21469/2 "2013-11-06T18:59:39Z")

</div>

It is unclear what you’re asking. What is it you want to achieve? 🙂

---

<div class="post-metadata">

**Author:** ![j.k](https://www.phphelp.com/letter_avatar_proxy/v4/letter/j/d07c76/32.png) [@j.k](https://www.phphelp.com/u/j.k)\
**Post date:** [November 6, 2013, 7:16pm UTC](https://www.phphelp.com/t/php-script-to-update-html-file-s/21469/3 "2013-11-06T19:16:47Z")

</div>

Hi,

What I want to achieve is same as this thread starter’s [http://forums.anandtech.com/archive/index.php/t-1894038.html](http://forums.anandtech.com/archive/index.php/t-1894038.html).

And I was wondering if there is a PHP script/software which can do that task on my web site.

Regards,

---

<div class="post-metadata">

**Author:** ![j.k](https://www.phphelp.com/letter_avatar_proxy/v4/letter/j/d07c76/32.png) [@j.k](https://www.phphelp.com/u/j.k)\
**Post date:** [November 6, 2013, 7:29pm UTC](https://www.phphelp.com/t/php-script-to-update-html-file-s/21469/4 "2013-11-06T19:29:30Z")

</div>

Hi,

Modeps guy on the forum posted “sounds like you should have used some sort of server side scripting language… like say, php… that way, you would only have to update one file instead of 800.”

And I was wondering if there is the php script with which I would only have to update one file instead of 1000 htmls

Regards,

---

<div class="post-metadata">

**Author:** ![JimL](https://www.phphelp.com/user_avatar/www.phphelp.com/jiml/32/1842_2.png) [@JimL](https://www.phphelp.com/u/JimL)\
**Post date:** [November 6, 2013, 7:49pm UTC](https://www.phphelp.com/t/php-script-to-update-html-file-s/21469/5 "2013-11-06T19:49:27Z")

</div>

If you want to update something (like the footer in that example) you can just do a recursive search and replace. How you do that depends on your OS / editor.

If you want a website that is easier to maintain you should rewrite it in a language like PHP, it will allow you to use one template for different sets of data. Like a single profile template used for displaying the user info of all your users.
