File upload, pediatrics related issues

Source: Internet
Author: User
File Upload, pediatrics questions, help
Micro-0.6 file upload, attachment directory to 777, but upload still have a problem:
Tip: Saving upload file failed
if (!file_move ($file [' Tmp_name '], attachment_root. '/' . $result [' path ']) {
Return error (-1, ' Save upload file failed ');


Is it a path problem?
------to solve the idea----------------------
Echo Attachment_root. '/' . $result [' Path '];
The goal is to see if your target file name is correct.

Is it cloud space? Confirm not a cloud host?
If it is a cloud space, it is not supported PHP file Operation function, please confirm that you have purchased the file system services they provide
------to solve the idea----------------------
Echo Attachment_root. '/' . $result [' Path '];
No output?
Block other code First, just perform this look.

If there is no output, there is already a problem with the previous code.
------to solve the idea----------------------
Attachment_root. '/' . $result [' Path '])
Determine the directory permission is 777
  • 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.