Re: Read From COM1 port

From: Date: Thu, 03 Mar 2005 19:56:25 +0000
Subject: Re: Read From COM1 port
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-209941@lists.php.net to get a copy of this message
Kim Madsen wrote: > I'm having trouble reading from COM1, writing works like a charm but I'd > like to be able to read the output from a switch or a router in order to > determine that the command was successful and the configuration actually > went fine :-) > > doing: > > $fp = fopen("COM1", "rwb"); You might try this: $input = fopen("COM1", "rb"); $output = fopen("COM1", "wb"); Use $output to write, and $input to read. Another possibility would be to check the manual... I don't thing 'rwb' is the correct way to fopen for read/write access. 'wb+' would be a better answer, I think. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#209941) next »