/    Sign up×
Community /Pin to ProfileBookmark

Image not showing

Hi,

I have a page called video.html in a directory called videos. I also have an image that goes along with the video.html called video.jpeg in a directory called images. I add the two together and it works but when I add an include script to my index.php the image isn’t showing but the text is. Why is this?

[code=php]<?php
include(“videos/video.html”)
?>[/code]

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@s0nofr4g3Feb 05.2006 — could we possibly see the page? whats the url if it has one
Copy linkTweet thisAlerts:
@CytaelFeb 05.2006 — your problem is in how the include function handles directory structure.

when you use include(), you basically take the code from the included file and inject it into the includer file, so any subdirectories you use are gonna be a little bit off.

In practice, that means that at runtime your index.php file contains an html tag saying <img src="video.jpeg"> when in reality it needs <img src="videos/video.jpeg"> to find the picture in question.

It sounds a little confusing when written out like this, but play around with it and you should see what I mean -- feel free to ask if you've got any more questions. ?
Copy linkTweet thisAlerts:
@BOB101authorFeb 06.2006 — [URL=http://www.1.zipzapgaming.com]Link[/URL] here is a link. Please excuse the foal language but that is the name of the movie.
Copy linkTweet thisAlerts:
@SheldonFeb 06.2006 — What images cant be found?

What is the code in the included file?

Please give us some relivant code!
×

Success!

Help @BOB101 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.12,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...