![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
相关问题
以下两个代码片断,那个快些?
URL:http://127.0.0.1/url.php?index=show
片断一:
<?php
$index = $_GET[index];
$indexfile = "include/".$index.".php";;
if(file_exists($indexfile)){
include $indexfile;
}else{
include "include/default.php";
}
?>
片断二:
<?php
$index = $_GET[index];
switch($index) {
default:
include 'include/default.php';
break;
case 'login':
include "include/login.php";
break;
case 'register':
include "include/register.php";
break;
}
?>
[ 本帖最后由 seeee 于 2007-3-12 03:20 PM 编辑 ]
提问者:seeee 08-22 14:02
答复

