View Single Post
Old 11-15-2012, 12:49 AM   PM User | #5
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,890
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
the folder needs to we writable by the web-server ... this will check...
PHP Code:
<?php
$src_folder
='/public_html/.mydomain/cam';
$dest_folder='/public_html/.mydomain/cam/backup';
$arr=array('cam_office1','cam_office2a','cam_office2b','cam_home');
if(!
is_writable($dest_folder)){
    die(
"$dest_folder not writable");
}
if(
file_exists("$src_folder/{$cam_office1}.jpg")){
    
rename("$src_folder/{$cam_office1}.jpg","$dest_folder/{$cam_office1}_".date('ymdhis').".jpg");
}else{
   echo 
"can't find file {$src_folder}/{$cam_office1}.jpg<br />";
}
?>
__________________
resistance is...

MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

Last edited by firepages; 11-15-2012 at 12:52 AM..
firepages is offline   Reply With Quote