Most Referenced Functions
  » google_pagerank()
  » preg_replace()
  » imagecreatefrompng()
  » site_pageranks()
  » imagepng()
  » imagedestroy()
  » imagestring()
  » imagecolorallocate()
  » htmlentities()
  » preg_match()
  » fopen()
  » header()
  » getimagesize()
  » preg_match_all()
  » session_start()
  » htmlspecialchars()
  » ob_start()
  » ob_flush()
  » strstr()
  » flush()
  » strpos()
  » setcookie()
  » str_replace()
  » array2vars()
  » nl2br()
  » preg_split()
  » ereg()
  » ereg_replace()
  » urlencode()
  » readgzfile()

Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m.

PHP Functions

Function: posix_mknod

(no version information, might be only in CVS)

posix_mknod --  Create a special or ordinary file (POSIX.1)

Description

bool posix_mknod ( string pathname, int mode [, int major [, int minor]] )

posix_mknod() creates a special or ordinary file.

Parameters

pathname

The file to create

mode

This parameter is constructed by a bitwise OR between file type (one of the following constants: POSIX_S_IFREG , POSIX_S_IFCHR , POSIX_S_IFBLK , POSIX_S_IFIFO or POSIX_S_IFSOCK ) and permissions.

major

The major device kernel identifier

minor

The minor device kernel identifier

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example 1. A posix_mknod() example

<?php

$file = '/tmp/tmpfile';  // file name
$type = POSIX_S_IFBLOCK; // file type
$permissions = 0777;     // octal

if (!posix_mknod($file, $type | $permissions)) {
    die('Error ' . posix_get_last_error() . ': ' . posix_strerror(posix_get_last_error()));
}

?>

Related Function(s)

  • posix_mkfifo()
  • Icemelon -- PHP, CSS, Javascript Tutorials, & More!
      © 2005-2010 Icemelon.com   Email: dave[AT]icemelon[D0T]c0m