Getting error after inserting 3 pages php data insert script -
i have 3 php pages details supposed inserted db in final php.. geetting these warnings below data inserted. know these warning can turned of error reporting doesnt me go that..
warning: copy(): first argument copy() function cannot directory in /home/opterfhb/public_html/quest4home.com/search/add_edit_property_finish.php on line 301 warning: unlink(tmp_imgs/tmp_1011/..): directory in /home/opterfhb/public_html/quest4home.com/search/add_edit_property_finish.php on line 302 warning: copy(): first argument copy() function cannot directory in /home/opterfhb/public_html/quest4home.com/search/add_edit_property_finish.php on line 301 warning: unlink(tmp_imgs/tmp_1011/.): directory in /home/opterfhb/public_html/quest4home.com/search/add_edit_property_finish.php on line 302
i think have defined wrong way.. seeking help..
i getting error on section:
// moveing temp images property directory if ($handle = opendir('tmp_imgs/tmp_'.$property_id)) { while (false !== ($file = readdir($handle))) { //$file_ext = strtolower(substr($file, strrpos($file, '.') + 1)); copy('tmp_imgs/tmp_'.$property_id.'/'.$file, 'property_images/img_'.$property_id.'/'.$file); unlink('tmp_imgs/tmp_'.$property_id.'/'.$file); } closedir($handle); }
the error clear: cannot use function copy directories. however, may not aware you're trying in first place.
there magical "files" in each directory directories (.
, ..
), if you're iterating on directory , copying in it, need explicitly skip two.
Comments
Post a Comment