|Read tutorial now--Report this tutorial|
Description: There's no fcreate() function in PHP, so for novice users, it's sometimes hard to figure out how to create a file using PHP. The answer is rather simple. The function fopen() has multiple modes, which determine how the function acts. The modes w, w+, a, a+, x, and x+ will all create the file if it doesn't already exist. Our example will use w+, which opens or creates the file for reading and writing after truncating it.
|Added:|| Tue Jan 23, 2007 23:20:54|