A
Anonymous
Guest
Hello!
This is absolotely ok to use Includes. I think this is a best way.
But (to my mind) you can change your script to look this way:
I mean that there is no need to write $id=$_GET['id']; before every IF.
And it this case it is better to use ' than " bacause it takes more time to parse " than '.
Or better than if (in your case) it is better to use SWITCH
Also if you must open pages from another site you can use CURL module:
Bereza Nikita
Rapid Internet Development Department
E-mail: nike@alarit.com
Alar Information Technologies,
URL: http://www.alarit.com
This is absolotely ok to use Includes. I think this is a best way.
But (to my mind) you can change your script to look this way:
Code:
......
<?php
$id=$_GET['id'];
if($id=='home') include 'home.php';
if($id=='story') include 'story.php';
if($id=='characters') include 'characters.php';
.......
if($id=='ginjiamano') include 'ginjiamano.php';
if($id=='hevn') include 'hevn.php';
?>
...........
I mean that there is no need to write $id=$_GET['id']; before every IF.
And it this case it is better to use ' than " bacause it takes more time to parse " than '.
Or better than if (in your case) it is better to use SWITCH
Code:
switch ($id) {
case 'ginjiamano':
include 'ginjiamano.php';
break;
case 'hevn':
include 'hevn.php';
break;
case ''characters'':
include 'characters.php';
break;
.......
}
Also if you must open pages from another site you can use CURL module:
Code:
$ch = curl_init ("$path/show.php");
// Receiving data from Script
$data=curl_exec ($ch);
if (!$data){
echo curl_error($ch);
}
Bereza Nikita
Rapid Internet Development Department
E-mail: nike@alarit.com
Alar Information Technologies,
URL: http://www.alarit.com