Jump to content

Include and path to images


weirdvision

Recommended Posts

I'm trying to convert an old site that is currently using frames to PHP.

 

The directory structure is the following:

 

/articles

/articles/item1

/articles/item1.html

/articles.html

/index.php

 

In index.php I have the page item1.html included with 'include'. The page item1.html is displayed on the screen when included, but the images that should appear on it are not. The images associated to each itemX.html file are stored in an itemX subfolder of the articles folder. Is it possible to have images displayed without having to change the actual path in each html file? It's a pretty big site, over 400 pages, so I'm looking for minimum amount of changes needed. Thank you in advance!

Link to comment
https://forums.phpfreaks.com/topic/205625-include-and-path-to-images/
Share on other sites

Running a script to change all the files once would me my choice, unfortunately the owner of the site uses a HTML editor to update the site so this method would not work for her. Unless someone comes with another idea I think I will use str_replace at runtime as you suggested. Thank you very much.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.