note 110007 deleted from function.getcwd by aharvey

From: Date: Tue, 11 Sep 2012 11:14:40 +0000
Subject: note 110007 deleted from function.getcwd by aharvey
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-190622@lists.php.net to get a copy of this message
Note Submitter: domenicfiore at gmail dot com ---- For people not using the command line and want a simple way to retrieve a file that resides within the same directory as the script being executed, here is a function that should allow this: <?php function getFileInCwd($file) { $cwd = getcwd(); //Get current working directory. $output = $cwd."/".$file; //Concatenate current working directory and the file specified by the function. return $output; } ?>

« previous php.notes (#190622) next »