filesystems - Filepaths in Wampserver and PHP -


trying use filesystem functions in wampserver environment , cannot read or open files.

ran these:

echo dirname('c:/wamp/localhost/www/test/test.php');  $basename = basename('c:/wamp/localhost/www/test/'); var_dump($basename);  $pathinfo = pathinfo('c:/wamp/localhost/www/test/'); var_dump($pathinfo);  $realpath = realpath('c:/wamp/localhost/www/test/test.php'); var_dump($realpath); 

which returned:

c:/wamp/localhost/www/test string 'test' (length=4) array (size=3)   'dirname' => string 'c:/wamp/localhost/www' (length=21)   'basename' => string 'test' (length=4)   'filename' => string 'test' (length=4) boolean false 

but:

$match_id = file('c:/wamp/localhost/www/test/ccg_wcp.csv'); 

gives me:

warning: file(c:/wamp/localhost/www/test/ccg_wcp.csv): failed open stream: no such file or directory in c:\wamp\www\test\test.php on line 32

coming linux, don't understand windows filepath settings. file there, wampserver not seeing it.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -