Re: Slash problem in link
| From: | Luis Moreira | Date: | Mon, 22 Mar 2004 14:55:57 +0000 |
| Subject: | Re: Slash problem in link | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-23218@lists.php.net to get a copy of this message | ||
This is not PHP related...
What is your server, IIS or Apache ?
If it is Apache, do you have ALIAS ?
It is different to alias /images (with trailing slash) and
images (WITHOUT trailing slash), you know ?
Luis
----- Original Message -----
From: "Harpreet" <harpreet@crispincorp.com>
To: <php-windows@lists.php.net>
Sent: Monday, March 22, 2004 2:36 PM
Subject: RE: [PHP-WIN] Slash problem in link
> My images folder and the login page is at the root of my main project.
>
> f:/inetpub/wwwroot/project/login.php
> f:/inetpub/wwwroot/project/images\onlylogo.gif"
>
> The link <IMG src="images/onlylogo.gif"> works in the login.php at home
> but <IMG src="/images/onlylogo.gif"> does not work
>
> Customers path is
> C:\project\servicepack\WebPages\login.php
> C:\project\servicepack\WebPages\images\onlylogo.gif"
>
> The link <IMG src="/images/onlylogo.gif"> works in the login.php
> but <IMG src="images/onlylogo.gif"> does not work
>
> I am running php on IIS customer is PHP on Apache. Do i need to change any
> php setting in ini file
> Thanks
>
> Regards,
> Harpreet
>
>
>
>
>
>
>
> -----Original Message-----
> From: Student [mailto:coolstudprit@hotmail.com]
> Sent: Sunday, March 21, 2004 4:11 PM
> To: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Slash problem in link
>
>
> I think its better to have the image folder in the root directory eg
> www.website.com/image and then have the code as <img
> src="/image/website.png" />. That way, it would be able to access the
image
> from anyway in your web site...(I Think)
>
> "Paul Brownsea" <dxdad27@yahoo.co.uk> wrote in message
> news:200403210751.03147.dxdad27@yahoo.co.uk...
> On Sunday 21 March 2004 05:33, Harpreet wrote:
> > I am having a weird problem. I am not sure if this is a php problme or
> > plain html problme but see if anyone can help.
> >
> > I have a page called login.php. It has the following image link. It
> works
> > at home fine when i put the link as below
> >
> > <IMG src="images/onlylogo.gif">
> >
> > We tried putting the same page on another customer and it wont show.
We
> put
> > a slash in the front of image and it worked and we can view the image.
> <IMG
> > src="/images/onlylogo.gif">
> >
> > But the slash does not work at home on my machine.
> >
> > When do we have to use the slash and when not ...how can we tell
> >
> > please help
>
> With the "/" you are delcaring that the image is in the directory
> "images",
> relative to the server root (maybe "c:\program
> files\apache\htdocs\images\onlylogo.gif" giving a webaddress of
> "http://www.mywebsite.com/images/onlylogo.gif").
> Whereas without the "/"
> you
> are declaring that the image is in the "images" directory, relative to
the
> PHP script (or HTML page) (maybe "c:\program
> files\apache\htdocs\MYWEBSITE\images\onlylogo.gif" giving
>
> "http://www.mywebsite.com/MYWEBSITE/images/onlylogo.gif").
> So I think it
> is
> just a HTML problem.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>