Results 1 to 6 of 6
  1. #1

    Default help in printing using php


    here the scenario:

    i want to print a text file to a network printer...
    here's d code:

    Code:
    <?
    $command="copy c:\\test1.txt LPT2";
    $result=shell_exec($command);
    echo $result;
    ?>
    output: 0 file(s) copied

    dont know why it doesnt print, i tried the command manually in dos prompt, works perfectly...
    also the file is at the right directory and it does exist...
    ive also tried using exec function, same result...

    any idea why? and how?

    note: LPT2 is an alias port of the network printer...
    i used the command "net use LPT2 \\printserver\printer /persistent:yes"

  2. #2
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    your printer uses LPT or USB?

  3. #3
    Quote Originally Posted by MarkCuering View Post
    your printer uses LPT or USB?
    usb bt connected to a print server...LPT2 is just an alias port of the network printer...

  4. #4
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    how do you installed your printer? and why you choose that kind of alias? are you aware that windows uses global names such as that, pointing to specific functions. you can't even create folder name having "LPT0", and so the rest mentioned below. try it...

    SERIAL PORT = COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9
    PRINTER PORT = LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9.

    for USB devices, normally it would appear like:

    USB001 = Virtual Printer Port for USB

  5. #5
    Quote Originally Posted by MarkCuering View Post
    how do you installed your printer? and why you choose that kind of alias? are you aware that windows uses global names such as that, pointing to specific functions. you can't even create folder name having "LPT0", and so the rest mentioned below. try it...

    SERIAL PORT = COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9
    PRINTER PORT = LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9.

    for USB devices, normally it would appear like:

    USB001 = Virtual Printer Port for USB
    ah,got it..i forgot...its a reserve word d i..bt it works when doing manually, thats y i ddnt think of that..
    i mean when i do this command in dos prompt it work...

    thanks problem is solve...i just didnt use the aliasing of the ports..y dd i do that in the first place?

  6. #6

  7.    Advertisement

Similar Threads

 
  1. Need help in MSACCESS using VB6
    By Kazekage in forum Programming
    Replies: 3
    Last Post: 10-11-2009, 10:51 AM
  2. help in php
    By ingkiang in forum Programming
    Replies: 3
    Last Post: 11-20-2008, 10:59 AM
  3. opening an eps file in photoshop using php..
    By ichiriki in forum Programming
    Replies: 1
    Last Post: 10-28-2008, 06:43 PM
  4. HELP: in configuring dsl modem for use with a voip box
    By asdfg in forum Networking & Internet
    Replies: 12
    Last Post: 09-11-2007, 05:27 PM
  5. i need some help in using DREAMweaver please.
    By staT|c-X in forum Software & Games (Old)
    Replies: 0
    Last Post: 01-27-2007, 05:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top