php - Upload file on a subdomain

236

For my app I decided to change the directory of static and public content to another domain. However, I had troubles about the copy of files into folders.

I decided to restrict the access of subdomain to a specific path. Indeed, when you log in to the ftp, you can't show the subfolders

So atm, this is what I have : A domain www.domain.com A subdomain www.static.domain.com

Ftp logs which only allow me to show the content of www.static.domain.com

Then, I wish to copy files and directories after user's register. I can create folders, but I can't copy files...

The getcwd() function returns me this : /datas/vol2/xxxx/var/www/domain.com/htdocs

instead of /datas/vol2/xxxx/var/www/static.domain.com/htdocs

That's why I can't copy the index.html file at the root of the subdomain to each folders i'm going to create.

Do you have any ideas about that ?

Thanks for answers T

445

Answer

Solution:

What about the "copy" or "move" Command?

People are also looking for solutions to the problem: php - Show captcha when unexpected navigation detected to prevent traffic abuse

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.