Article View: pl.comp.lang.php
Article #231Re: Pytanie o url cd...
From: Ufok
Date: Sun, 19 Aug 2001 15:16
Date: Sun, 19 Aug 2001 15:16
43 lines
1568 bytes
1568 bytes
fks napisa³(a):
>
> Witam ponownie :)
> Mam juz kawalek kodu, ktory dziala:
> <?
>
> if(!isset($dzial)){
> include("index.html");
> } else {
> if($id==0){
> include("index.html");
[ciach...]
> }else{
> echo "Brak tre¶ci o podanym ID";
> }
> }
> ?>
Proponuje zrobic switch'a :
<?
if(!isset($dzial))
{
include("index.html");
}
else
{
switch ($id)
{
case 0: include("index.html"); break;
case 1: include("dzial1.html"); break;
case 2: include("dzial2.html"); break;
case 3: include("dzial3.html"); break;
case 4: include("dzial4.html"); break;
case 5: include("dzial5.html"); break;
default: echo "Brak tre¶ci o podanym ID";
}
}
?>
--
Pozdrawiam
Ufok
Technical Details
Message-ID:
<3B7FD869.130E994F@megapolis.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!pcmedia.com.pl!news.man.szczecin.pl!news.task.gda.pl!news.icm.edu.pl!news.tpi.pl!not-for-mailReferences:
<9loim6$g3r$1@news.tpi.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!pcmedia.com.pl!news.man.szczecin.pl!news.task.gda.pl!news.icm.edu.pl!news.tpi.pl!not-for-mail From: Ufok <przemek@megapolis.pl> Newsgroups: pl.comp.lang.php Subject: Re: Pytanie o url cd... Date: Sun, 19 Aug 2001 17:16:57 +0200 Organization: tp.internet - http://www.tpi.pl Lines: 43 Message-ID: <3B7FD869.130E994F@megapolis.pl> References: <9loim6$g3r$1@news.tpi.pl> NNTP-Posting-Host: pa197.krakow.cvx.ppp.tpnet.pl Mime-Version: 1.0 X-Trace: news.tpi.pl 998238157 8015 213.76.36.197 (19 Aug 2001 16:22:37 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: 19 Aug 2001 16:22:37 GMT X-Posting-Agent: Chomik/1.0.3.18 X-Accept-Language: en,pl X-Mailer: Mozilla 4.7 [pl] (Win95; I) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit