当前位置:  开发笔记 > 编程语言 > 正文

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

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

回复内容:

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是没有文件的读写权限的.
节哀

推荐阅读
罗文彬2502852027
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有