Re: All Request to the same script
| From: | [-^-!-%- | Date: | Wed, 15 Jan 2003 21:05:33 +0000 |
| Subject: | Re: All Request to the same script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131755@lists.php.net to get a copy of this message | ||
have you tried
==idex.php===
switch($op) {
case "intro":
include("welcome.php");
break;
case "about":
include("about.php");
break;
case "contact":
incldue("contact.php");
break;
default:
include("welcome.php");
}
==== You would then list your links (in the html pages) as
<a href='index.php?op=about'>About us</a>
<a href='index.php?op=contact'>About us</a>
<a href='index.php?op=intro'>Back to home</a>
Note: You can substitute 'index.php?op=about' with '?op=about'.
i.e.
<a href='?op=about'>About Us</a>
-john
=P e p i e D e s i g n s
www.pepiedesigns.com
Providing Solutions That Increase Productivity
Web Developement. Database. Hosting. Multimedia.
On Wed, 15 Jan 2003 SLanger@spirit21.de wrote:
> Hello
>
> Is it possible to send all incoming requests to the same script within
> PHP?
> In other words: How can I get http://mysite/script.php to point
> to the
> same script as http://mysite/anotherscript.php ? And is it
> possible to do
> send a request like
> http://mysite/someextrapathinfo to the same php script?
> The background behind it is to create a controler that handles all
> incoming requests and dispatches them to different worker scripts as
> nessecary.
>
> Thanks in advance
>
> Stefan Langer