*** Maja escribió/wrote (Fri, 14 Jan 2005 20:34:28 +0100):
i can call my page with:
localhost\\subdir\page.php
I can't figure out what you mean with this :-?
<a href="<?php $_SERVER['PHP_SELF']?>?style=bold">
There's no "echo", I suppose it's just a typo.
http://subdir/page.php?style=bold
- "localhost" is missing, and therefore browser reports that page is
unavailable. If i set my link to
From PHP manual <http://es2.php.net/manual/en/reserved.variables.php>:
'PHP_SELF'
The filename of the currently executing script, relative to the document
root. For instance, $_SERVER['PHP_SELF'] in a script at the address
http://example.com/test.php/foo.bar would be /test.php/foo.bar. The
__FILE__ constant contains the full path and filename of the current (i.e.
included) file.
If PHP is running as a command-line processor, this variable is not
available.
Check the rest of the page. Also, check the phpinfo() function. There isn't
a function that returns the current URL (which is actually never sent to
the server by the client) but you can build yours adding pieces: protocol,
host name, port, path...
In any case, you don't need the full path for internal links. Just remove
the "http://" part I'm pretty sure you add.
--
-+ Álvaro G. Vicario - Burgos, Spain
+-
http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Las dudas informáticas recibidas por correo irán directas a la papelera
-+ I'm not a free help desk, please don't e-mail me your questions
--