note 48110 deleted from function.getcwd by betz

From: Date: Sun, 12 Dec 2004 11:43:52 +0000
Subject: note 48110 deleted from function.getcwd by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81712@lists.php.net to get a copy of this message
Note Submitter: lost at lost1 dot net ---- Here's a quick little function to return just the name of the current working directory (rather than the full path). function curdir() { $dir = substr(getcwd(), strrpos(getcwd(),"\\")+1, strlen(getcwd())); return $dir; } NOTE: change the "\\" to "\/" for non-windows systems. ---- Reason: bad code

« previous php.notes (#81712) next »