"storage" -> "New Domain" -> "Domain Management" in the "Application" page; then modify "jssdk.php" "File; finally click Save and rerun."/> "storage" -> "New Domain" -> "Domain Management" in the "Application" page; then modify "jssdk.php" "File; finally click Save and rerun.">

Home  >  Article  >  Backend Development  >  What should I do if sae cannot write to jssdk.php?

What should I do if sae cannot write to jssdk.php?

藏色散人
藏色散人Original
2020-09-02 11:00:501755browse

The solution to the problem that sae cannot write to jssdk.php: First, find "Storage and CDN Services"->"storage"->"New domain"->"domain" in the "Application" page Manage"; then modify the "jssdk.php" file; finally click Save and rerun.

What should I do if sae cannot write to jssdk.php?

## Recommendation: "

PHP Video Tutorial"

Warning: fopen(access_token.json) [function.fopen]: failed to open stream: Permission denied in jssdk.php on line 82
Warning: fwrite() expects parameter 1 to be resource, boolean given in jssdk.php on line 83
Warning: fclose() expects parameter 1 to be resource, boolean given in jssdk.php on line 84
Warning: fopen(jsapi_ticket.json) [function.fopen]: failed to open stream: Permission denied in jssdk.php on line 59
Warning: fwrite() expects parameter 1 to be resource, boolean given in jssdk.php on line 60
Warning: fclose() expects parameter 1 to be resource, boolean given in jssdk.ph

Question:

Direct Download "sample" from the WeChat JSSDK instruction page. After modifying the code, directly compress the files in the folder into .zip format (note, do not compress the folder, but directly compress the files in the folder). Upload to SAE. When the WeChat front-end opens the URL, a bunch of Warings are prompted.

Solution:

Put the two files access_token.json and jsapi_ticket.json into the special repository of Sina SAE.

(1) On the "Application" page, find "Storage and CDN Service" - "storage" - "New domain" - "Domain Management".


(2) Modify the jssdk.php file: Change the path of the warning prompt to the current path of the above two files:





(3) Click Save and rerun, the above warning will disappear.


The above is the detailed content of What should I do if sae cannot write to jssdk.php?. For more information, please follow other related articles on the PHP Chinese website!

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