This is the main page(http://www.example.com/main.php) that contain all the 1000 variable values for the 1000 pages
Code: Select all
<?php
$url = (basename($_SERVER['SCRIPT_NAME'])) ;
switch($url){
case "url_1.php" :
$title = " Page 1" ;
$content = " This is the first page with long text..................................." ;
$link = "http://www.example.com/url_1.php" ;
break;
// case goes until 1000
case "url_1000.php" :
$title = " Page 1000 " ;
$content = " This is the 1000 or the last page with long text.................... " ;
$link = "http://www.example.com/url_1000.php" ;
}
?>
<html>
<head>
<title><?php echo $title ?></title>
</head>
<body>
<p><?php echo $content ?></p>
<a href=<?php echo $link ?> >Home</a>
</body>
</html>This is one of the 1000 individual pages, http://www.example.com/url_1000.php
Code: Select all
<?php include("http://www.example.com/main.php") ?>How fast will the website be served or php execute the switch statement from the beginning of the case until the last case which is the 1000 or the last if a visitors demand for the url http://www.example.com/url_1000 as shown above. Any clarification will be much appreciate, Thank you.