欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

javascript - 微信接入JS时遇到这个问题

程序员文章站 2022-06-16 18:21:55
...
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

回复内容:

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

是什么环境下。如果是Linux环境就把,就把access_token.json和jsapi_ticket.json的读写权限打开。

别告诉我你用的是SAE。 SAE不支持本地写权限,得修改代码。
你可以把access token存储到SAE的memcache里面

如果是其他的系统,请把写权限打开。

这个是在SAE作为测试环境的原因, 今天刚好我也遇到了. SAE是没有文件的读写权限的.
节哀