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

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -