NYCPHP Meetup

NYPHP.org

[nycphp-talk] Server Path for HTML IMG SRC?

Daniel Convissor danielc at analysisandsolutions.com
Tue Mar 29 13:26:50 EST 2005


On Tue, Mar 29, 2005 at 01:13:15PM -0500, Stephen Musgrave wrote:
> 
> I have an issue where there is a file that sits in /events/file.php and 
> it includes images that sit in /events/images/.  File.php is also 
> included in /otherevents/ and the paths to image assets are relative in 
> file.php, causing the images to 404 because they are looking for the 
> images in an images directory that doesn't have that particular asset.

You could use symbolic links on the file system.

Or make file.php smarter.  Use a variable for the path in the img src's 
and have the variable determined according to where the calling file is.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list