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

藏色散人
Release: 2023-03-05 16:46:01
Original
1578 people have browsed it

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!