Re: Re: site path
| From: | Bogdan Stancescu | Date: | Thu, 10 Oct 2002 16:06:37 +0000 |
| Subject: | Re: Re: site path | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119550@lists.php.net to get a copy of this message | ||
I'm not sure exactly what you're trying to point out - does XHTML require double quotes?
Bogdan
@ Edwin wrote:
Just a thought... If you're going to write an XHTML compatible code, you wouldn't really have this problem -->echo("<A HREF='$my_URLhome'>Go home</A>");since you'll probably write something like this: echo '<a href="' . $my_URL . 'home">Go home</a>'; > Of course, I didn't mean that you can't do that with HTML... Anyway, for the original question, I think, you shouldn't really add "http://" to every link that points to the same site. Most probably, the browser and the server can handle the request faster since *I think* it doesn't need to query a DNS server for each request. I'm not sure about this one though... :( Need more research... - E On Thursday, October 10, 2002 10:18 PM Bogdan Stancescu wrote:I generally use both - the first for includes and the second for HTMLlinks.Do NOT include the trailing slash. The reason is simple: <? echo("<A HREF='$my_URL/home'>Go home</A>"); ?> is much simpler to write and follow than <? echo("<A HREF='{$my_URL}home'>Go home</A>"); ?> because you obviously can't write <? echo("<A HREF='$my_URLhome'>Go home</A>"); ?> Please remember that since the trailing slash will be included in every use of this var, if your URL is the root then the variable will have to be empty! (otherwise you'll end up with a double slash at the beginning of every URL) Bogdan Wilmar Perez wrote:storeHello guys I'm just looking for some advise: I've got a variable which I use toanswer onmy site's main path. Is it better to have it like this: $site_path = "/my/web/path/" or like this: $site_path = "http://my_url.com/" ? What about the trailing slash?, should I use it or not? I know these are simple question but haven't been able to get to anmy own. Thanks a lot *******************************************************-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpWilmar Pérez Network Administrator Library System Tel: ++57(4)2105145 University of Antioquia Medellín - Colombia 2002*******************************************************