php - How to transfer uploaded image to a directory as well as copy it to another directoryGet the solution ↓↓↓
on my project folder there is images/committee/images.jpg . This where the uploaded images are moving to
Now what m trying to achieve is that.. On the Project folder there is a folder names as
user/images/committee/target.jpg this where i want to copy the image to.
i tried using this.. but i think m giving wrong path. can some one help
if you use absolute paths you should be OK. ie:
copy( __DIR__ . "/images/committee/".$new_image_name, __DIR__ . "/user/images/committee/".$new_image_name );
This worked for me. Do remember to check if you are in right directory if it is not working.
People are also looking for solutions of the problem: illuminate\http\exceptions\posttoolargeexception
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.