Re: [php] Directory erstellen ?
Archiv Mailingliste php_(at)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [php] Directory erstellen ?

Kristian Köhntopp wrote:
> > >um Verzeichnisse anzulegen. Funktionen wie getuid() und
> > >getpwnam() kann ich derzeit in PHP3 nicht entdecken.
> > wozu wären die denn gut ?

Ich bin kein Experte, aber sieht nicht das folgende so aus?


This method will return the user ID of the PHP process itself. It
does not use the built in php method
getmyuid(), which is 99% of the time a lieing sack of puss that is
best ignored. This method determines it's
user id by creating a temporary file, and then performing a stat()
check on the file. The results of this method are cached by the
class for more efficient results. (So if you call this method right
after a new(), the class will perform a teensy-bit faster) 

	function get_real_uid()
		$tempDir = $this->TEMPDIR;
		$tempFile = tempnam($tempDir,"cdi");
			$this->ERROR = "is_owner: Unable to create [$tempFile]";
			return false;
		$stats = stat($tempFile);
		$uid = $stats[4];
		$gid = $stats[5];
		$this->REALUID = $uid;
		$this->REALGID = $gid;
		return $uid;


Mit freundlichem Gruss
Werner Stuerenburg

ISIS  Gesellschaft fuer Softwareentwicklung und -vertrieb mbH
Webdesign - Uhlandstr. 8  -  D-32120 Hiddenhausen  -  Germany
Tel. 0(049)5224-9974-07, Fax-09,  <mailto:ws_(at)>
-  <>  -  <>  -

Home | Main Index | Thread Index

php::bar PHP Wiki   -   Listenarchive