hi,

m changing file name with rename()

code:

$name=cgal'.date("Y-m-d").'.xml';

rename(cgal.xml',$name);

rename("cgal_2.xml","cgal.xml");

but it give me error

Warning: rename(/test/XMLreader/cgal.xml,/test/XMLreader/cgal2008-07-31.xml) [function.rename]: No such file or directory in N:\WWW\finalweb\website_BACKUP2\test\XMLreader\xmldata.php on line 207

help me to solve this

    by specifying '/test/XMLReader/...' you are telling it to look in the server root dir for a directory called test.

    Place the server path to your web root in a var and reference that in your rename code:

    $webroot_path = "/var/www/";
    rename($webroot_path . 'cgal.xml', $webroot/path . $name);
    
    

      hi,
      thanx for reply

      have tried all thing but give me error like permission denied. n all permission 777 given to folder

      even wen i try to copy file it cant not permit

        Write a Reply...