[php]

y0y022 Messages postés 7 Statut Membre -  
Ssylvainsab Messages postés 2892 Statut Modérateur -
j'ai créer un script pour uploader des image mais l'affichage de l'image a un probleme:

Parse error: syntax error, unexpected T_STRING

voila la commande que j'utilise pour afficher l'image:

aidez moi s'il vous plait

img src=\""http://trichoko.free.fr/$newFile"\" align=\"center\"
Configuration: Windows XP
Internet Explorer 6.0

4 réponses

  1. Lust Messages postés 243 Statut Membre 123
     
    Je suis pas expert php, mais y a pas des " en trop? Ceux qui sont soulignés en gras :
    img src=\""http://trichoko.free.fr/$newFile"\" align=\"center\"

    moi, j'écrirais plutot ca :
    img src=\"http://trichoko.free.fr/$newFile\" align=\"center\"
    0
  2. Ssylvainsab Messages postés 2892 Statut Modérateur 825
     
    Moi je ferais plutôt ca, plus rapide :
    echo '<img src="http://trichoko.free.fr/',$newFile,'" style="margin:auto;" />';
    0
  3. y0y022 Messages postés 7 Statut Membre
     
    merci ca marche mais j'ai nu nouveau probleme:

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

    sur ces lignes:

    if ($thefile['type'] == "image/jpeg" || $thefile['type'] == "image/pjpeg") {
    $target_id = imagecreatetruecolor($dest_width, $dest_height);
    0
  4. Ssylvainsab Messages postés 2892 Statut Modérateur 825
     
    Bonsoir.

    Ca ne doit pas être sur ces lignes, je ne vois aucune erreur.
    Regarde les lignes au-dessus.
    0