The code I placed in the messsage is a copy and paste of the code from the sample.php script provided by the author of the barcode class and it agrees with the demo he has on his site.
The "error" is that nothing is happening which I interpret as the file, image.php is not being accessed (I put an Echo statement inside it and it does not execute). Here is the complete block of code:
if ($obj) {
if ($obj->DrawObject($xres)) {
echo "<table align='center'><tr><td><img src='./image.php?code=" . $barcode . "&style=" . $style . "&type=" . $type . "&width=" . $width . "&height=" . $height . "&xres=" . $xres . "&font=" . $font . "'></td></tr></table>";
// My debug code - this line executes!
echo "<table align='center'><tr><td><font color='#FF0000'>Success: Barcode = " . $barcode . "</font></td></tr></table>";
} else {
echo "<table align='center'><tr><td><font color='#FF0000'>" . ($obj->GetError()) . "</font></td></tr></table>";
// My debug code
echo "<table align='center'><tr><td><font color='#FF0000'>Problem; Barcode = " . $barcode . "</font></td></tr></table>";
}
} else {
// My debug code
echo "<table align='center'><tr><td><font color='#FF0000'>Obj is false; Barcode = " . $barcode . "</font></td></tr></table>";
}
Alex Ciurea wrote:
did u made copy&paste with your code?
yes? then why don't you try to use the path='image.php?blahblahmoreblah' ????
no? then please give us more details about the error you're getting...
good luck, Alex
----- Original Message ----- From: "Todd Cary" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 03, 2003 6:03 PM Subject: [PHP] This line does not execute...
I am trying to get the Sample Barcode to run on my server, however the following line does not execute:
echo "<table align='center'><tr><td><img src='./image.php?code=" . $barcode . "&style=" . $style . "&type=" . $type . "&width=" . $width . "&height=" . $height . "&xres=" . $xres . "&font=" . $font . "'></td></tr></table>";
To see if it is executing, I have an "Echo" statement in the script.
The image.php file is in the same directory as the other script files. What am I missing here?
Todd --
.
--