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