Parašė inT_lt· 2008 Geg. 21 13:05:59
#1
Sveiki, bandau savo puslapiui pritaikyt valdymo skripta, taciau susiduriau su problema kurios negaliu isspresti. Taigi, kai puslapis buna
index.php?id=bar2, tada isiterpia
bar2.html, kai
index.php?id=bar3 --
bar3.html. Taciau, kai puslapis buna
index.php (be jokios uzklausos gale), tada meta Notice, kad neranda
id (
Notice: Undefined index: id in c:\program files\easyphp1-8\www\page13\index.php). Kaip sia problema spresti? Aciu is anksto padejusiems.
Štai mano naudojamas skriptas:
<?php
$tekstas=$_GET['id'];
switch ($tekstas){
case bar2:
@include ("include/bar2.html");
break;
case bar3:
@include ("include/bar3.html");
break;
case bar4:
@include ("include/bar4.html");
break;
default:
@include ("include/bar1.html");
break;
}
?>
Redagavo inT_lt· 2008 Geg. 21 14:05:43