Title: fopen problem &#8211; not working
Last modified: September 21, 2016

---

# fopen problem – not working

 *  Resolved [guylancaster](https://wordpress.org/support/users/guylancaster/)
 * (@guylancaster)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/fopen-problem-not-working/)
 * I want to write data to a file on a users c: drive or on the wordpress webspace
 * $hdl=fopen(“afile”,”w”);
    fwrite($hdl,$data); fclose($hdl);
 * How do i get error messages out of fopen?
 * Failing that, i would like to email users with the data as an attachment (examples
   online assume the data exists as a file)

The topic ‘fopen problem – not working’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [guylancaster](https://wordpress.org/support/users/guylancaster/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/fopen-problem-not-working/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
