PHP not able to read csv file from C: drive
<p>Good Morning,</p>

<p>I am trying something where I want to read a CSV file from the C: drive (C:\downloads):</p>

<pre><code>&lt;?php
$file = "c:\\downloads\\test.csv";
$f = fopen($file, "r");
while ($record = fgetcsv($f)) {
    foreach($record as $field) {
        echo $field . "&lt;br&gt;";
    }
}
fclose($f);
?&gt;
</code></pre>

<p>However, I am getting the following messages:</p>

<pre><code>Warning: fopen(c:\downloads\test.csv) [function.fopen]: failed to open stream: No such file or directory in /home/content/99/10187599/html/csvread.php on line 3

Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/content/99/10187599/html/csvread.php on line 4

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/content/99/10187599/html/csvread.php on line 9
</code></pre>

<p>I am following this example from phpmaster.com. Why isn't the code looking at my C: drive and is looking in the HTML directory on the server instead? The file is definitely in my C:\downloads directory. </p>

<p>Thanks for having a look. </p>
