note 39541 added to function.shmop-open

From: Date: Sun, 01 Feb 2004 18:28:09 +0000
Subject: note 39541 added to function.shmop-open
Groups: php.notes 
Request: Send a blank email to php-notes+get-64517@lists.php.net to get a copy of this message
There is a little ftok function. This function isn't included into php for windows so i've grabbed it directly from linux glibc 2.3.2 source code. I hope that this can be useful. There is the code: <?php function ftok($pathname, $proj_id) { $st = @stat($pathname); if (!$st) { return -1; } $key = sprintf("%u", (($st['ino'] & 0xffff) | (($st['dev'] & 0xff) << 16) | (($proj_id & 0xff) << 24))); return $key; } echo ftok($_SERVER["SCRIPT_FILENAME"], 250); ?> sorry for my english :) ---- Manual Page -- http://www.php.net/manual/en/function.shmop-open.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39541 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39541&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39541&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64517) next »