473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

../ not working for images pulled from within an include file

djsjm
23
Hi guys!

I may be overlooking something dumb here...

For a series of subdirectories I put the masthead in as an include file, with ../ up to the directory above it. Problem is, it won't pull the images unless I have a masthead file in every single one of numerous subdirectories. Way too much work to update and it seems like uneccessary duplicate files.

Can someone tell me... is there some reason with PHP that this won't work?

~ Debbie
Nov 9 '08 #1
6 1374
dlite922
1,584 Expert 1GB
don't put the ../ in the image.

If you have file "foo.php" and need to include "bar.php", any images in "bar.php" need to have relative path as if they were in foo.php.

Images are not called server side, they are called by user's browser. Experiment on the URL that you need for the images to work.



Dan
Nov 9 '08 #2
djsjm
23
hi Dan! I just popped back online to post that I figured out what I was doing wrong.

I have no idea what a foo is past a foo fighter... and the only bars I know about are the ones that card you at the door and come in the form of chocolate (I partake of neither!).

What did the trick was simply having a masthead for each of the levels of pages, and within each masthead, putting how many ever ../s before each image that it took to get the job done. 3 masthead files instead of about 100. Works for me!

=)

Nice to see somone is around while I'm being insane at 2 in the morning.
Nov 9 '08 #3
Markus
6,050 Expert 4TB
I have no idea what a foo is past a foo fighter... and the only bars I know about are the ones that card you at the door and come in the form of chocolate (I partake of neither!).

Nice to see somone is around while I'm being insane at 2 in the morning.
Foobar is just programming riffraff, used to explain different things. It/they have no real meaning.

Glad you got it sorted, although I couldn't make sense of the problem, but I have just got up.
Nov 9 '08 #4
Dormilich
8,658 Expert Mod 8TB
Foobar is just programming riffraff, used to explain different things. It/they have no real meaning.
that's not quite correct, see RFC 3092
Nov 9 '08 #5
Markus
6,050 Expert 4TB
that's not quite correct, see RFC 3092
Wow, someone must've been bored to go through all that effort to give meaning to nothing.
Nov 9 '08 #6
Dormilich
8,658 Expert Mod 8TB
although my all time favourite is RFC 2324 – time for a coffee using HTCPCP/1.0
Nov 9 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Vinay | last post by:
Hi All: I have a small application that stores images either in the database or as files (depending on the user preference). I'm in the process of providing a web interface to this application....
13
by: moondaddy | last post by:
Happy Holidays All! I want to load a datagrid with images and text (Image, text, image, text, etc...). The data for this datagrid will be coming from sql server and the images are stored as files...
2
by: Spondishy | last post by:
Hi, I've taken over a publishing application that stores images in a sql server db. The architecture is basically many load balanced web servers connecting to the db. When an image is pulled...
2
by: lawpoop | last post by:
Hello all -- I'm having a problem getting images to appear in the body of an HTML email using PEAR's mail_mime class. Here's my code, what am I doing wrong? include("Mail.php");...
5
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is...
2
by: Rodger | last post by:
All, I am looking to re-work my main page and have been using include statements on it and I now want to add another section, but this time my include is ASP. If I pull the ASP up by itself it...
9
by: mrcheeky | last post by:
Hi, I'm stuck, but it's almost working! From a html page, my javascript calls a server-side php script. The php reads a value from a server-side .txt file and passes it back as a javascript...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.