Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1179 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  [PHP] Condition qui marche pas ( BOOL )

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[PHP] Condition qui marche pas ( BOOL )

n°461381
sakuraba
Posté le 18-07-2003 à 11:46:36  profilanswer
 

Code :
  1. //Chemin des images a afficher  
  2. $handle='\\\\srv2\\\groupes\\\referentiel\\' .$wrin ."_1.jpg";
  3. //Chemin de l'image lorsqu'il n'y pas de photo pour le produit
  4. $error='http://srvnet01\gif\blue1.jpg';
  5. if ($handle == TRUE) {
  6.  print "<img src=$handle  width='360' height='300'>";}
  7. else {
  8.  print"<img src=$error  width='360' height='300'>";
  9. }


 
Ca marche pas j y arrive pas je pourrais avoir un peu d aide merci

mood
Publicité
Posté le 18-07-2003 à 11:46:36  profilanswer
 

n°461391
sakuraba
Posté le 18-07-2003 à 11:50:29  profilanswer
 

la Deuxieme condition ne passe pas

n°461413
sakuraba
Posté le 18-07-2003 à 12:02:53  profilanswer
 

:bounce:

n°461420
pascal_
Posté le 18-07-2003 à 12:06:52  profilanswer
 

Faudrait pas plutot :
 
if( isset( $handle ) )
 
ou  
 
 
if( $handle != '' )
 

n°461422
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 18-07-2003 à 12:09:24  profilanswer
 

Sakuraba a écrit :

la Deuxieme condition ne passe pas  


Ba tu m'étonnes, tu fais un test "est-ce que ma chaîne de caractères est égale à un booléen ?"
Tu veux tester quoi ?


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°461431
sakuraba
Posté le 18-07-2003 à 12:19:12  profilanswer
 

je vourdrais savoir si le fichier existe si oui il l affiche sinon il affiche l'image du error

n°461434
pascal_
Posté le 18-07-2003 à 12:20:48  profilanswer
 


Fonction  file_exists  
 

n°461460
sakuraba
Posté le 18-07-2003 à 12:47:27  profilanswer
 

ouais ca marche merci

n°462054
docwario
Alea jacta est
Posté le 18-07-2003 à 20:49:35  profilanswer
 

au fait ca camarchera po :
$error='http://srvnet01\gif\blue1.jpg';
 
mais ca oui :
$error='http://srvnet01/gif/blue1.jpg';
 
mazik, non ?

n°462165
sakuraba
Posté le 18-07-2003 à 22:40:19  profilanswer
 

oauis maerci


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  [PHP] Condition qui marche pas ( BOOL )

 

Sujets relatifs
[PHP] Pear comme systeme d'authentification?Un forum PHP / MySQL
[PHP] Rah niveau sécurité jsuis plus trop certainaffichage des infos d'une table postgresql en passant par PHP
[HTML/JS/PHP] un bouton 'Set As Wallpaper'Moteur de recherche : Prquoi ça marche pas?
[PHP] Transformer une chaine contenant de l'hexa en hexa...[PHP] LOAD DATA > ça marche sous Phpmyadmin mais pas ... (resolu)
[ASP=>PHP] transcrire ce code de l asp en php 
Plus de sujets relatifs à : [PHP] Condition qui marche pas ( BOOL )


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR