This problem occurs when javascript-WeChat is connected to JS.

Source: Internet
Author: User
Warning: fopen (access_token.json) [function. fopen]: failedtoopenstream: Permissiondeniedinjssdk. phponline79Warning: fwrite () expectsparameter1toberesource, booleangiveninjssdk. php... warning: fopen (access_token.json) [function. fopen]: failed to open stream: Permission denied in jssdk. php on line 79

Warning: fwrite () expects parameter 1 to be resource, boolean given in jssdk. php on line 80

Warning: fclose () expects parameter 1 to be resource, boolean given in jssdk. php on line 81

Warning: fopen (jsapi_ticket.json) [function. fopen]: failed to open stream: Permission denied in jssdk. php on line 56

Warning: fwrite () expects parameter 1 to be resource, boolean given in jssdk. php on line 57

Warning: fclose () expects parameter 1 to be resource, boolean given in jssdk. php on line 58

Reply content:

Warning: fopen (access_token.json) [function. fopen]: failed to open stream: Permission denied in jssdk. php on line 79

Warning: fwrite () expects parameter 1 to be resource, boolean given in jssdk. php on line 80

Warning: fclose () expects parameter 1 to be resource, boolean given in jssdk. php on line 81

Warning: fopen (jsapi_ticket.json) [function. fopen]: failed to open stream: Permission denied in jssdk. php on line 56

Warning: fwrite () expects parameter 1 to be resource, boolean given in jssdk. php on line 57

Warning: fclose () expects parameter 1 to be resource, boolean given in jssdk. php on line 58

Environment. In a Linux environment, read and write permissions of access_token.json and jsapi_ticket.json are enabled.

Don't tell me you are using SAE. SAE does not support local write permission. You must modify the code.
You can store the access token in the memcache of SAE.

For other systems, open the write permission.

This is the reason for using SAE as the test environment. Today, I have encountered that SAE does not have the permission to read and write files.
Mourning

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.