You are here: Re: relative path / absolute path « PHP Programming Language « IT news, forums, messages
Re: relative path / absolute path

Posted by Jerry M. Gartner on 06/19/06 15:06

I understand that this is a php group. Thus the post. The question is
relevant to php as I am writing a rather ugly php application - the post
from Jan was just what I was looking for. I appreciate everyone's input.

--

Regards,

Jerry M. Gartner

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:rrWdnYXXsKRASQjZnZ2dnUVZ_t2dnZ2d@comcast.com...
> Jerry M. Gartner wrote:
>> Greetings:
>>
>> What is the best way to resolve paths within a document regardless of
>> what path it is opened under? For example: I have x.php and it contains
>> <img src="images...">, (amongst other things, like php code), which
>> resolves the correct image path when opened under / but when x.php is
>> read into a file under /dir the image no longer resolves, for obvious
>> reasons. With absolute paths, this isn't an issue but it is with
>> relative paths. Although I can think of a kludge, or two, I figure that
>> there is a more elegant solution. Thanks in advance.
>>
>
> First of all, this isn't a PHP question - <img statements are html,
> whether they're included in PHP or not. Now - if you were talking about
> include(), require_once(), etc., you 'd be talking php.
>
> The easiest way I've found is to just use absolute URL's for the images -
> i.e.
>
> <img src="/images...">
>
> Works everyplace on the site and you don't need to include extra files.
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация