Writing to COM-Port with PHP 4.3.0 on OS/2 with Apache 2.0.44
| From: | Thorolf Godawa | Date: | Sun, 23 Feb 2003 01:21:28 +0000 |
| Subject: | Writing to COM-Port with PHP 4.3.0 on OS/2 with Apache 2.0.44 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-136692@lists.php.net to get a copy of this message | ||
Hi,
how can I write to a COM-Port on OS/2 using PHP 4.3.0 with Apache 2.0.44?
With
$fp = fopen ("COM1", "w+");
$string = chr($OutCmd) . chr($Platine) . chr($OutData) . chr($OutPruef);
fputs ($fp, $string );
fclose ($fp);
it seems not to work ($fp returns "Resource id #2"), and
$fp = fopen ("COM1:", "w+");
...
..
.
creates an error: "Warning: fopen(COM1:) [function.fopen]: failed to create stream: No such file or directory in x:\htdocs\test.php on line 3" :-(
The same functionality with Rexx is working!
Thanks a lot,
Thorolf