php - how to store uploaded one image to parent and sub directories -
i have 2 directory company model branch model both have upload folder
$name = $_files["file"]["name"]; // here working move_uploaded_file( $_files["file"]["tmp_name"], "upload/" . $name ); move_uploaded_file( $_files["file"]["tmp_name"], "branch model/upload/" . $name );
use copy()
$target_path = "upload/"; $target_path2 = "branch model/upload/"; move_uploaded_file($_files['file']['tmp_name'], $target_path.$name); copy($target_path.$name, $target_path_2.$name);
Comments
Post a Comment