Title: fopen
Last modified: January 19, 2021

---

# fopen

 *  [neobiz](https://wordpress.org/support/users/neobiz/)
 * (@neobiz)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/fopen-2/)
 * Hello,
 * I’am trying to use fopen in a php snippet but this is doesn’t works.
    I use the
   code `$file = fopen("/myfile.txt",a) or die("Unable to open file!");` but nothing
   is happened. Is someone has an idea about this issue please ?
 * Regards,

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [neobiz](https://wordpress.org/support/users/neobiz/)
 * (@neobiz)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/fopen-2/#post-13934451)
 * Ok sorry, the problem is resolved, it was an issue from file path (not using 
   absolute path).
 *  Thread Starter [neobiz](https://wordpress.org/support/users/neobiz/)
 * (@neobiz)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/fopen-2/#post-13934454)
 * The problem is resolved !

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘fopen’ is closed to new replies.

 * ![](https://ps.w.org/insert-php-code-snippet/assets/icon-128x128.png?rev=1800967)
 * [Insert PHP Code Snippet](https://wordpress.org/plugins/insert-php-code-snippet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php-code-snippet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php-code-snippet/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/)

## Tags

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

 * 2 replies
 * 1 participant
 * Last reply from: [neobiz](https://wordpress.org/support/users/neobiz/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/fopen-2/#post-13934454)
 * Status: not resolved