Thank You!
need link changing code
Moderator: General Moderators
need link changing code
I have over 500 pages on my Game website. Now, I want to place a top-10 games section in each page. I will change top10 links weekly. Is there any php code so that The only top 10 content of all pages changes simultaneously.
Please Help Me!
Thank You!
Thank You!
- mattcooper
- Forum Contributor
- Posts: 210
- Joined: Thu Mar 17, 2005 5:51 am
- Location: London, UK
Re: need link changing code
Sounds like you want an "included" file here:
Put that call on all of your pages and then you'll only need to edit the 'top10.php' file - all pages will receive the update immediately.
Code: Select all
<?php
//main file
echo "<h1>My main page</h1>";
require_once ('/path/to/top10.php');
?>
Re: need link changing code
Thank You, for your precious suggestion!
But my problem is that, all my pages are in html format & i want to use the same html format pages. I don't want to change my all pages to .php extension. Can i use this php code in my html pages?
Still, I want to create a simple column of top 10 list in right side of each page. Otherwise, suggest me any other best method.
Thank You!
But my problem is that, all my pages are in html format & i want to use the same html format pages. I don't want to change my all pages to .php extension. Can i use this php code in my html pages?
Still, I want to create a simple column of top 10 list in right side of each page. Otherwise, suggest me any other best method.
Thank You!
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: need link changing code
Yes you can use PHP code in HTML page. Simply type it like this:
However, how is you site structure? How are pages called?
Code: Select all
<?PHP include"file.php"; ?>