help with printer
Posted: Wed Dec 20, 2006 3:17 pm
im trying the following and for some reason it will not work
The code
And i get the following
Am i doing something wrong? ive looked and looked but cant find anything that shows what is wrong, or needs to be correct. It appears to connect to the printer ok but nothing else.
I do have extension=php_printer.dll in the php.ini file
The code
Code: Select all
<?php
print("testing the printer function");
$handle = printer_open("\\\\10.2.5.28\\Canon");
printer_set_option($handle, PRINTER_MODE, 'RAW');
printer_write($handle, "Testing");
printer_close("\\\\10.2.5.28\\Canon");
?>Code: Select all
testing the printer function
Warning: printer_set_option(): supplied argument is not a valid Printer Handle resource in c:\Inetpub\wwwroot\testing fun\print.php on line 6
Warning: printer_write(): supplied argument is not a valid Printer Handle resource in c:\Inetpub\wwwroot\testing fun\print.php on line 8
Warning: printer_close(): supplied argument is not a valid Printer Handle resource in c:\Inetpub\wwwroot\testing fun\print.php on line 10I do have extension=php_printer.dll in the php.ini file