Bon qu'est-ce qui se passe si tu mets dans ta barre d'adresse directement
Code : Tout sélectionner
<br />
<b>Notice</b>: Undefined variable: width in <b>D:\wamp\www\nicocv\func\pi_barcode.php</b> on line <b>911</b><br />
<br />
<b>Notice</b>: Undefined variable: readable in <b>D:\wamp\www\nicocv\func\pi_barcode.php</b> on line <b>914</b><br />
<br />
<b>Notice</b>: Undefined variable: showtype in <b>D:\wamp\www\nicocv\func\pi_barcode.php</b> on line <b>915</b><br />
<br />
<b>Notice</b>: Undefined variable: color in <b>D:\wamp\www\nicocv\func\pi_barcode.php</b> on line <b>918</b><br />
‰PNG
IHDRsPW¢í PLTEÿÿÿ ßøë<ØIDATH‰íÐÁj1P-ÊÞÌ}é±_¡Ü
ÄÿÙOÙc?³Îd™ÞRèô/1HJ¹äMdK©(6Ræ¦) ì±téÒ¥K—þ~~Íôí9ÓÛ…Îó©nÓ»÷ÇßuÞy>Õý}¦ôÊ_…ŽtDù9Ž2'ídÐ\{î%‹cG‰4´§JÌØ„¸XÓJ$‘ʮȡÀÔœlèvjtŽ[sÔšUkF{uæhl†•öªy(¤:feˆ"û©Gf<5že8¦‰—÷Œb/EòØÈb“Ðc£ÜÝ~oþÓá%Z¼IEND®B`‚
if (strpos($_SERVER['REQUEST_URI'], 'pi_barcode.php'))
{
extract($_GET);
// ***** Création de l'objet
$objCode = new pi_barcode() ;
$type = strtoupper($type);
// ***** Hauteur / Largeur
if( isset($height) || isset($width) ) $objCode->setSize($height, $width);
// ***** Autres arguments
if( $readable == 'N' ) $objCode->setText('');
if( $showtype == 'N' ) $objCode->hideCodeType();
if( $color )
{
if( $bgcolor ) $objCode->setColors($color, $bgcolor);
else $objCode->setColors($color);
}
$objCode -> setType($type) ;
$objCode -> setCode($code) ;
$objCode -> showBarcodeImage() ;
}
Merci encore !Bon qu'est-ce qui se passe si tu mets dans ta barre d'adresse directement
Voici le résultat :Voici la portion de code de pi_barcode.php contenant les lignes cités plus haut. C'est un bloc if situé à la fin du programme.Code : Tout sélectionner
<br /> <b>Notice</b>: Undefined variable: width in <b>D:\wamp\www\test\func\pi_barcode.php</b> on line <b>911</b><br /> <br /> <b>Notice</b>: Undefined variable: readable in <b>D:\wamp\www\test\func\pi_barcode.php</b> on line <b>914</b><br /> <br /> <b>Notice</b>: Undefined variable: showtype in <b>D:\wamp\www\test\func\pi_barcode.php</b> on line <b>915</b><br /> <br /> <b>Notice</b>: Undefined variable: color in <b>D:\wamp\www\test\func\pi_barcode.php</b> on line <b>918</b><br /> ‰PNG IHDRsPW¢í PLTEÿÿÿ ßøë<ØIDATH‰íÐÁj1P-ÊÞÌ}é±_¡Ü ÄÿÙOÙc?³Îd™ÞRèô/1HJ¹äMdK©(6Ræ¦) ì±téÒ¥K—þ~~Íôí9ÓÛ…Îó©nÓ»÷ÇßuÞy>Õý}¦ôÊ_…ŽtDù9Ž2'ídÐ\{î%‹cG‰4´§JÌØ„¸XÓJ$‘ʮȡÀÔœlèvjtŽ[sÔšUkF{uæhl†•öªy(¤:feˆ"û©Gf<5že8¦‰—÷Œb/EòØÈb“Ðc£ÜÝ~oþÓá%Z¼IEND®B`‚Merci encore !if (strpos($_SERVER['REQUEST_URI'], 'pi_barcode.php')) { extract($_GET); // ***** Création de l'objet $objCode = new pi_barcode() ; $type = strtoupper($type); // ***** Hauteur / Largeur if( isset($height) || isset($width) ) $objCode->setSize($height, $width); // ***** Autres arguments if( $readable == 'N' ) $objCode->setText(''); if( $showtype == 'N' ) $objCode->hideCodeType(); if( $color ) { if( $bgcolor ) $objCode->setColors($color, $bgcolor); else $objCode->setColors($color); } $objCode -> setType($type) ; $objCode -> setCode($code) ; $objCode -> showBarcodeImage() ; }
Oui, effectivement, honte à moi !!Les erreurs ne sont-elles pas explicites ?
Code : Tout sélectionner
$img = '<IMG src="D:\wamp\www\test\func\pi_barcode.php?type=EAN&code=$codbarre&height=80&width=400&readable=N&showtype=N&color=#323232&bgcolor=#eeaac6" alt="Mauvais chemin de fichier">';
echo $img;