Jump to content

issues with include files, and .htaccess - help...


mac007

Recommended Posts

Hello, all:

 

I have this issue with my includes files; I have this code in my htaccess file so that files that use any of these includes automatically read the includes from root folder.

 

 

php_value include_path ".:/home/server/domains/mysite.com/html"

 

they seem to work OK, but for some reason the images inside those includes files are not being rendered in some of the files that are within deeper subdirectory folders; it does read the html, but not the images... I thought maybe if I made the source-image reference for them to be absolute instead of relative (so use http://www.mysite.com/images/myimage.jpg) woudl solve the problem, but that didnt work either. It's stranger, cause in some other subdirectory files that use these includes the images appear!

 

Am I doing something wrong? do includes need to be off the root folder, but in its own "includes" folder for them to work properly??

 

Anyways, any feedback truly appreciated!

 

Thanks

 

 

Since images are fetched by the browser using <img src="url_of_image"> in the html, they have nothing to do with the include_path or php include() statements.

 

If you are using a relative URL in the src="..." parameter, than the image would need to be at that relative location to the URL of the page being output. Your absolute URL example (so use http://www.mysite.com/images/myimage.jpg) should have worked if the URL is correct and the image file exists. Any chance you are on a case-sensitive operating system and the character-case of the file names don't match the URL's?

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.