Advertisement
doukouk

PHP 5 File Create/Write

Feb 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. PHP 5 File Create/Write
  2. The fopen() function is also used to create a file. Maybe a little confusing, but in PHP, a file is created using the same function used to open files.
  3.  
  4. If you use fopen() on a file that does not exist, it will create it, given that the file is opened for writing (w) or appending (a).
  5.  
  6. The example below creates a new file called "testfile.txt". The file will be created in the same directory where the PHP code resides:
  7. Download file on MediaFire: https://goo.gl/gzjnsT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement