note 110007 added to function.getcwd

From: Date: Tue, 11 Sep 2012 10:49:29 +0000
Subject: note 110007 added to function.getcwd
Groups: php.notes 
Request: Send a blank email to php-notes+get-190620@lists.php.net to get a copy of this message
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; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 146.115.188.228 ---- Manual Page -- http://www.php.net/manual/en/function.getcwd.php Edit -- https://master.php.net/note/edit/110007 Del: integrated -- https://master.php.net/note/delete/110007/integrated Del: useless -- https://master.php.net/note/delete/110007/useless Del: bad code -- https://master.php.net/note/delete/110007/bad+code Del: spam -- https://master.php.net/note/delete/110007/spam Del: non-english -- https://master.php.net/note/delete/110007/non-english Del: in docs -- https://master.php.net/note/delete/110007/in+docs Del: other reasons-- https://master.php.net/note/delete/110007 Reject -- https://master.php.net/note/reject/110007 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#190620) next »