Questions about deploying code to Sina Cloud

Source: Internet
Author: User
Click on the form "Upload" button and then jump to the processing page do_photo.php, showing a blank

The Apache service on the native and MySQL does not appear these errors, show normal!

Ask the Great God for answers


Reply to discussion (solution)

Upload?
All clouds do not support normal file system functions, simply to say that they do not support writing files
You either turn on his virtual file system service (for a fee)
or change to save the uploaded file to the database (not tested)

Save the uploaded file to the database how's this whole?

You check to see if $_files works.
Whether the uploaded temporary files will read properly

My Sina cloud space due to arrears can not be used (open new application also not), not interested in re-registration disk him

Temp file? What do you think?

Sina has restrictions on the writing of documents.

Reference:

Http://www.sinacloud.com/doc/sae/php/runtime.html#ben-di-io

Where the path of TMPFS can be obtained by sae_tmp_path this global variable, the path has write permission, the user can write the file in the previous directory.

Reference to the above sentence, should be able to write.

Specifically, you see the documents in the address above.

No, the great God, there is no relevant examples, I will not the whole Ah, novice only, in order to complete the big job

First put out the code, see below.

Sina Cloud is not a storage you pass there

Can be written to the storage path, but the picture link should be how to write

Can be written to the storage path, but the picture link should be how to write



Can be written to the storage path, but the picture link should be how to write



Use Sinacloud\sae\storage as Storage; $s = new Storage ();//Create a bucket test$s->putbucket ("test");/**object upload Operation **/// The cache file in the $_files global variable is uploaded to test bucket, which is set to the object named 1.txt$s->putobjectfile ($_files[' uploaded ' [' Tmp_name '], "test", " 1.txt ");//The Object 1.txt in the private bucket test generates a URL that can be accessed temporarily by the GET method in the external network, with the secondary URL expiration time of 600s$s->gettempurl (" test "," 1.txt "," get ", 600);


Reference API Documentation Http://apidoc.sinaapp.com/class-sinacloud.sae.Storage.html

I'm actually more aware of the so-called cloud server

What is the purpose of the company's dynamic website?

If you use the database provided on top of the cloud, then our user data is equal to who is public?

  • 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.