Afficher image dans un tableau

Résolu
cs_hitu Messages postés 15 Date d'inscription mardi 10 mai 2011 Statut Membre Dernière intervention 21 juin 2011 - 11 mai 2011 à 16:54
cs_hitu Messages postés 15 Date d'inscription mardi 10 mai 2011 Statut Membre Dernière intervention 21 juin 2011 - 12 mai 2011 à 11:38
Bonjour,

je voudrais afficher mes images à partir du dossier photo qui se trouve dans le repertoire www de wamp.
J'arrive à visualiser les images quand elles ne sont pas dans le dossier.
Je n'arrive pas à faire un lien vers mon dossier photo.

merci d'avance

echo "<tr><td> </td><td>".$uneLigne['idimage']."</td><td>".$uneLigne['titre']."</td><td>".$uneLigne['support']."</td> <td>".$uneLigne['photographe']."</td> <td>".$uneLigne['date']."</td><td>".$uneLigne['provenance']."</td> <td>".$uneLigne['droitimage']."</td><td>".$uneLigne['description']."</td> <td>".$uneLigne['localisation']."</td></tr>";
} ;

6 réponses

cod57 Messages postés 1653 Date d'inscription dimanche 7 septembre 2008 Statut Membre Dernière intervention 11 septembre 2013 19
12 mai 2011 à 11:35
je crois il manque le point .$lien ...
ok ça devrait fonctionner

echo '<tr><td>
['.$lien.$uneLigne['idimage'].'.jpg

voir]</td>



Bonne programmation !
3
cod57 Messages postés 1653 Date d'inscription dimanche 7 septembre 2008 Statut Membre Dernière intervention 11 septembre 2013 19
11 mai 2011 à 22:57
bonsoir
essaie voir comme ça
a++
<?php

/*verif*/ 
echo '';
print_r($uneLigne);
echo '

';
/*fin verif*/


echo '<tr><td> ['.$uneLigne['idimage'].'.jpg 

voir]</td>

<td>'.$uneLigne['idimage']."</td><td>'.$uneLigne['titre'].'</td>

<td>'.$uneLigne['support'].'</td> <td>'.$uneLigne['photographe'].'</td>

<td>'.$uneLigne['date'].'</td><td>'.$uneLigne['provenance'].'</td>

<td>'.$uneLigne['droitimage'].'</td>

<td>'.$uneLigne['description'].'</td>

<td>'.$uneLigne['localisation'].'</td></tr>';
?> 

Bonne programmation !
0
cs_hitu Messages postés 15 Date d'inscription mardi 10 mai 2011 Statut Membre Dernière intervention 21 juin 2011
12 mai 2011 à 10:03
Bonjour,

Cette solution marche quand l'image est hors du dossier.
Mon dossier s'appelle photo.
0
cod57 Messages postés 1653 Date d'inscription dimanche 7 septembre 2008 Statut Membre Dernière intervention 11 septembre 2013 19
12 mai 2011 à 10:35
bonjour

['.$uneLigne['idimage'].'.jpg

voir]

photo ?
donc tu as un repertoire
en local
$lien='http://localhost/rep_1/rep_x/photo/';
ou en distant
$lien='http://monsite.fr/un_repertoire/photo/';

donc tu faits

['$lien.$uneLigne['idimage'].'.jpg

voir]

a++



Bonne programmation !
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
cs_hitu Messages postés 15 Date d'inscription mardi 10 mai 2011 Statut Membre Dernière intervention 21 juin 2011
12 mai 2011 à 11:04
J'ai fais ça:

$lien='http://localhost/basephoto/photo/';


echo '<tr><td>
['$lien.$uneLigne['idimage'].'.jpg

voir]</td>

mais Parse error: parse error, expecting `','' or `';'' in C:\wamp\www\basephoto\resultat.php on line 158
la ligne 158 est <a href...
0
cs_hitu Messages postés 15 Date d'inscription mardi 10 mai 2011 Statut Membre Dernière intervention 21 juin 2011
12 mai 2011 à 11:38
Merci beaucoup ça marche
0
Rejoignez-nous