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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to