אשכול: בעיה בPHP
View Single Post
ישן 03-04-06, 20:45   # 3
BlueNosE
אין כמו ב127.0.0.1
 
BlueNosE's Avatar
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: כפ"ס
גיל: 32
הודעות: 4,086

BlueNosE לא מחובר  

ציטוט:
נכתב במקור על ידי bigsmoke
PHP קוד:
<?php
///////////// index file


//$page = $_GET["page"];
if($page == "x"// if index.php?page=x, it will include x.php
{
@include(
"x.php");
} elseif(
$page == "news"// if index.php?page=news, it will include news.php
{
@include(
"news.php");
} elseif(
$page == ""// if isset page for index, it will print indextables.php
{
@include(
"indextables.php")
}
?>
ולמה לא פשוט לעשות
PHP קוד:
if (!empty ($_GET['page']))
@include_once (
$_GET['page'].".php");
else
@include_once (
"default.php"); 
__________________
עומר,
admin [@] rely.co.il

בניית אתרים Rely

סלנג מילון סלנג utter
  Reply With Quote