Php problems related to uploading/saving files to different paths

Source: Internet
Author: User
Php uploads/saves files to different paths. I have just written this program but it is not successful. the script file used for upload is C: \ www \ xxx.com \ upload. php uses this program to upload the file and save it to D: \ date \ xxx.com. these two directories have the same permissions. php uploads/saves files to different paths.
Ask a white question.
I have just written this program but it is not successful.

The script file used for upload is C: \ www \ xxx.com \ upload. php.
Use this program to upload the file and save it to D: \ date \ xxx.com.

These two directories have the same permissions and grant the highest permissions (read/write/column directory) to the script executor.

But the attempt failed. can this problem be implemented? Isn't php unable to save it to a directory other than the site root directory?


PS: I tried the script to work and saved it to C: \ www \ xxx.com \ temp (same directory)

------ Solution --------------------
Of course. Add is_writable () to determine whether it is writable. The default open_basedir setting in php. ini is unlimited.
------ Solution --------------------
Path, if it is written by window
Writing D: \ date \ xxx.com \\
General expression D:/date/xxx.com/

Permission problems
If the target partition is NTFS, the write permission must be granted to the general user.
If the web server is IIS, you must grant anonymous users the write permission.

Also, check "allow archiving"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.