dio_open

(PHP 4 >= 4.2.0, PECL)

dio_open --  Opens a new filename with specified permissions of flags and creation permissions of mode

Description

resource dio_open ( string filename, int flags [, int mode] )

dio_open() opens a file and returns a new file descriptor for it, or FALSE if any error occurred. If flags is O_CREAT, the optional third parameter mode will set the mode of the file (creation permissions). The flags parameter can be one of the following options:

The flags parameter can also include any combination of the following flags:

See also: dio_close().

Przykład 1. Setting the baud rate on a serial port

<?php

$fd
= dio_open('/dev/ttyS0', O_RDWR | O_NOCTTY | O_NONBLOCK);

dio_close($fd);
?>

Hosting by: Hurra Communications Sp. z o.o.
Generated: 2007-01-26 18:02:25