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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -