i'm trying check if 2 files exist @ same time in same sentences , not work.. when separate sentences in 2 conditionals work nothing happen, no error, no warning nothing... please suggestion?
this simple code:
$folder_img_small = 'images/press/img_small/'; $folder_img_big = 'images/press/img_big/'; $target = $folder_img_small; $target = $target . basename( $_files['img_small_1']['name']); $target2 = $folder_img_big; $target2 = $target2 . basename( $_files['img_big_1']['name']); if ( (file_exists($target)) && (file_exists($target2)) ) { echo "one of files exists same name."; $uploadok = 0; }
why not try using or
this
if ( (file_exists($target)) || (file_exists($target2)) ) { echo "one of files exists same name."; $uploadok = 0; }
try , see if works. compares if exists either in 1st target or in 2nd. once in exists in then....
Comments
Post a Comment