Title: problem reading a .csv
Last modified: August 19, 2016

---

# problem reading a .csv

 *  [mamulea](https://wordpress.org/support/users/mamulea/)
 * (@mamulea)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/problem-reading-a-csv/)
 * Hello and thank you for reading this.
 * I have a .csv file that I am trying to read in a static page. Although the file
   was uploaded correctly and I have no restriction reading .csv on the server (
   just checked the same script outside WordPress and works fine), when I read it
   in WordPress i got this errors:
 * _Warning: fopen() [function.fopen]: Unable to access file.csv in /hosting/web/
   clients/domain.tld/blog/wp-content/themes/theme\_name/csvreader.php on line 46_
 * _Warning: fopen(clasament.csv) [function.fopen]: failed to open stream: No such
   file or directory in /hosting/web/clients/domaind.tld/blog/wp-content/themes/
   theme\_name/csvreader.php on line 46_
 * where domain.tld is my domain name and theme_name is the theme I’m using.
 * This is the code I’m using:
    _ $handle = fopen(“file.csv”, “r”); while(($data
   = fgetcsv($handle, 1000, “,”)) !== FALSE) { $num = count($data); for ($c=0; $
   c < $num; $c++) { if ($data[$c]!=”){ echo $data[$c]; } } $row++; } fclose($handle);?
   >
 * Any idea why I could have this problem? 10x.

The topic ‘problem reading a .csv’ is closed to new replies.

## Tags

 * [csv](https://wordpress.org/support/topic-tag/csv/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [mamulea](https://wordpress.org/support/users/mamulea/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/problem-reading-a-csv/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
