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

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -