Right I've got a website but I'm after updating all the pages at once. Like say putting a new header in. This website has like over 5000 pages. So how do I go about updating it all at once? Can someone please help me!
If your site is hosted on Linux or BSD, you can easily accomplish this using a simple Perl script (read in files specified by a pattern and perform search and replace operations on the text), or by using the "sed" command in your shell.
I really don't understand this, is there like no program that could do it or anything? All my pages are just in simple html, I just really don't understand this.
Read this information about parsing PHP in html pages: http://www.desilva.biz/php/phpinhtml.html Or use a text editor that can do a seach and replace on all files in a directory (I personally use Dreamweaver), and add your new header to them all at once. It's not pretty, but it will work.
It's probably best if you change your site to use PHP includes (or something similar). That way you could have a header.php file and a footer.php and everytime you changed these files it'd change accross the whole site. Eg: <?php include('header.php'); ?> Content goes here <?php include('footer.php'); ?> PHP:
there is no need to change all site into PHP - but make sure you have PHP SSI properly configured, then add small PHP code with your desired text modules via SSI into your pages. this would be very much exactly as I have done to SSI adsense into all my pages and being able to update all at once. be careful updating an entire site. think twice what you intend to do as it may change the entire SEO of your site and if you change top of page / title / <head> section you may mess up and loose your current SERPS. if however you want to add G adsense or similar at once to all pages - that has NO effect on SERPS as it is javascript only. all you finally need to do is to assure your server parses PHP in your HTML pages. a G search for parsing php in html pages howto depending on server version you may need to add to above G search to get exact .htaccess solution from search for your individual situation ( apache 1.3, apache 2.0, 2.2, etc )
You don't have to change it. Simply put, If you have an html file you can put php code in it. The files you "include" have to be .php files. It's really easy to do something like this. 1. Copy the header out of a file, and paste it into a file called header.php, which you will need to create. 2. Copy the footer out of a file, and paste it into a file called footer.php, which you will need to create. 3. Delete the code that contains the header on all of the HTML files and replace it with: <?php include('header.php'); ?> 4. Delete the code that contains the footer on all of the HTML files and replace it with: <?php include('footer.php'); ?> When you want to update the header or footer simply open the file and edit the code as if it were HTML and not php. It works just as well plus it's simple! --- Like My Posts? Leave Me Rep+