Problem with destination in file upload with PHP

995

I am trying to upload files with PHP to 000webhost,but I am facing problems with the destination path.

I used this line of code

 $target_path = "/public_html" .$filename;

But thid does not work.Can someone help me how to set the destination path when uploading file to remote server?

25

Answer

Solution:

  1. enter000webhost's' File Manager.
  2. create folderuploads underpublic_html.
  3. set your code like the follower:$target_path="uploads/" . $filename;

People are also looking for solutions to the problem: php - RegEx for matching a HTML string

Source

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.

Ask a Question

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.

Similar questions

Find the answer in similar questions on our website.