Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display image with IMG

Status
Not open for further replies.

monasa

IS-IT--Management
Jun 27, 2004
41
CA
Hi,

echo"<IMG src='$fichier'>";

I do not get de image but juste it place.
I must clic on the place with the right bouton and choose "show picture", to get it!

Can you help please.

M.N
 
Assuming that your variable $fichier contains the path to the picture, the following should work:
Code:
echo  '<img src="' . $fichier . '">';

Without seeing more of your code, we really can't tell you what's wrong.

Ken
 
Here is the code.
I still have the same pb

// Les fichiers qui contiennent la discription des livres sont dans le repertoire livres
$path="vignettes";
$folder= dir($path);

echo "Consultation des images : <br><br><br><br>";
// Aller à travers chaque fichier et afficher le titre
while ($fichier = $folder->read()) {
if ($fichier !== "." && $fichier !== "..") {
//echo"<IMG src='$fichier'>";
echo '<img src="' . $fichier . '">';
}
}
 
Looking at your code the correct would be
Code:
echo "<img src=\"$path/$fichier\">";[CODE]
that'd work.

jamesp0tter,
mr.jamespotter@gmail.com

p.s.: sorry for my (sometimes) bad english :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top