---
title: "Discussion on \"How to re-write file contents in PHP?\" | Hashnode"
description: "Discussion on \"How to re-write file contents in PHP?\". For PHP developer must know How to overwrite a file if needed, To write data over file file_put_contents is to be used. This function is similar to calling fopen (), fwrite () & fclose () to write data to a file, respectively. In case if filename doe..."
url: "https://hashnode.com/posts/how-to-re-write-file-contents-in-php/60ebe6abc551f16b0f85114c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to re-write file contents in PHP?](https://coders07.hashnode.dev/how-to-re-write-file-contents-in-php?utm_source=hashnode&utm_medium=feed)

For PHP developer must know How to overwrite a file if needed, To write data over file file\_put\_contents is to be used. This function is similar to calling fopen (), fwrite () & fclose () to write data to a file, respectively. In case if filename doe...

Jul 12, 2021 · 1 min read · coders07.hashnode.dev  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#developer](https://hashnode.com/tag/developer)
-   [#development](https://hashnode.com/tag/development)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Coder's Team](https://hashnode.com/@code07)

@code07

  
[View profile](https://hashnode.com/@code07)

Let's build code

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
