Home >Backend Development >PHP Tutorial >Sina sae development cannot write files

Sina sae development cannot write files

WBOY
WBOYOriginal
2016-07-29 09:14:311051browse

Today, I was developing on Sina sae and found that the file could not be written, prompting a permission problem.

The code is as follows:

Sina sae development cannot write files

The error is as follows:

Sina sae development cannot write files

After checking the writing information, I found that I cannot have permission to write files in Sina sae development, so how to solve this problem? Finally, I found that Storage can be used for read and write operations.

added the prefix saestor://, and indeed, no error was reported. The modified code is as follows:

Sina sae development cannot write files

Finally, I found that if you use Memcache, or file Caching requires a prefix, as follows:

If the prefix of the address is saemc:// means reading and writing operations are performed in Memcache , if the prefix is ​​saestor://, it means reading and writing operations are performed in Storage. The prefix is ​​saekv://, which is the operation of KVDB. This is what Wrappers does

The above introduces the problem that Sina sae development cannot write files, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn