Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Richard Heyes
A link causes 'index.php/use1' to be appended to the full url [http://localhost/~donn/template-dev/routertest/] and at first, it's fine but after a few clicks, it keeps appending. Amazingly things still work, but the URL is out of control! Links that don't start with a / are taken to be relat

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Donn
On Tuesday, 18 March 2008 12:02:14 Richard Heyes wrote: > You can use $_SERVER['PHP_SELF'] which will give you the path to the > script or $_SERVER['REQUEST_URI'] (you will probably have to remove the > query string with this), along with either dirname(). The problem is that the URL does not stay

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Richard Heyes
The thing that would help here is if I could get a reliable way to extract the working 'path' (from an http:// pov) from the $_SERVER array somehow. Each of them gives a result tantalizingly close to the base, but they get it wrong in various ways. You can use $_SERVER['PHP_SELF'] which will giv

[PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Donn Ingle
Shawn McKenzie wrote: > Does seem strange.  Try: > > http://localhost/~donn/blah/index.php"; /> > > Then just use /home, /use1 etc...  Might work. Right, I'll give it a go. It's not much different from wiring-in a php var naming the base with {$base}/use1 being the form. The thing that would hel

[PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-17 Thread Shawn McKenzie
Donn Ingle wrote: > Shawn McKenzie wrote: >> Use /index.php instead of index.php maybe... > I assume you meant in the tag. I tried that and the URL (when you > mouse-over the link) becomes [http://localhost/index.php] which is not > anywhere near where the files live. > > I must say I am rather c

[PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-17 Thread Donn Ingle
Shawn McKenzie wrote: > Use /index.php instead of index.php maybe... I assume you meant in the tag. I tried that and the URL (when you mouse-over the link) becomes [http://localhost/index.php] which is not anywhere near where the files live. I must say I am rather confused by this situation, but

[PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-17 Thread Shawn McKenzie
UsDonn Ingle wrote: > Hi, > I have been trying to get a little templating thing going and I want > everything to pass through a single index.php file which then decides what > page is wanted and includes them. > > The scheme is to go to a url like [http://localhost/~donn/blah/] which > serves ind