Uploading Files to Your Web Site January 6, 2013 Creating the Form: Start out by creating a one-field form. You can create a form to upload as many files as you like after… Continue Reading
Delete Files in PHP January 6, 2013 Deleting Files:Be very careful when using the unlink() function because once you’ve deleted a file, it’s gone for good. Example:<?php$new_file = “e:/ashu.txt”;$success = unlink($new_file)… Continue Reading
Rename Files in PHP January 6, 2013 Renaming Files:Like the copy() function, the rename() function just needs to know the original filename and a new filename. In this case, you’re just… Continue Reading
Copying Files in PHP January 6, 2013 Copying Files in PHP: The copy() function is very simple: It needs to know the original filename and a new filename, and that’s all there… Continue Reading
Read Data from File with Proper New Line January 6, 2013 Read Data from File with proper New Line : That’s definitely the string written to the file, but what happened to that line break?… Continue Reading
Read Data from File January 6, 2013 Read Data from File: <?php$filename = “e:/readdata.txt”;$myfile = fopen($filename, “r”) or die(“Unable to open file”);$showfile = fread($myfile, filesize($filename));$showfile = “<br>$showfile<br/>”;$msg = “The file contents… Continue Reading
Append a File in PHP January 6, 2013 Append a File in PHP:<?php$filename = “e:/appendfile.txt”;$writetext = “My First filenHi world I am ASHISH PRAJAPATI”;$writefile = fopen($filename,”a+”) or die(“unable to create file”);fwrite($writefile, $writetext)… Continue Reading