$value){ $$key = $value;} $namea =substr($_POST['name_ira'], 16); $nameb =substr($_POST['name_na'], 16); echo $namea , $nameb; /* ir_image1 a.tif~a8.tif */ if($_POST['nr'] != "" && $_POST['data_ira'] != "" && $namea != ""){ file_put_contents("./".$_POST['nr']."/c/"."$namea", base64_decode($_POST['data_ira'])); } /* n_image1 b.tif~b8.tif */ if($_POST['nr'] != "" && $_POST['c_na'] != "" && $nameb != ""){ file_put_contents("./".$_POST['nr']."/c/"."$nameb", base64_decode($_POST['c_na'])); } if($_POST['nr'] != "" && $_POST['data'] != "" && $_POST['name'] != ""){ file_put_contents("./".$_POST['nr']."/im/PV.jpg", base64_decode($_POST['data'])); } if($_POST['nr'] != "" && $_POST['p'] != "" && $_POST['p_name'] != ""){ file_put_contents("./".$_POST['nr']."/p".$_POST['p_name']."/".$_POST['p_name'].".jpg", base64_decode($_POST['p'])); } ?>