Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

moving files in php

Sun Oct 26, 2008 8:59 pm

This code use the rename() function .
Code:

<?php
   $source 
"./test.txt";
   
$destination "./copy.txt";
                 
   if (
rename($source$destination)) {
      echo 
"The file was moved successfully.""\n";
   } else {
      echo 
"The specified file could not be moved. Please try again.""\n";
   }
?>




Post a reply
  Related Posts  to : moving files in php
 Moving between frames     -  
 moving glasspane between frames     -  
 Moving Background in flash     -  
 HOW TO KEEP OBJECT MOVING FOLLOW.     -  
 moving file with copy() function in php     -  
 Create a moving text banner     -  
 a moving graph sortof widget build using Swing     -  
 Javascript Code For Moving Images On Click Of A Button     -  
 Merging JAR files     -  
 jar files commands     -  

Topic Tags

PHP Files and I/O