【发布时间】:2015-05-12 23:25:57
【问题描述】:
我正在尝试打开与functions.php 放在同一目录中的.p12 密钥文件。我尝试使用file_get_contents()打开文件,我也尝试打开其他随机文件,发现无法打开。
PHP Warning: fopen(key.p12) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in path/wp-content/themes/theme-name/functions.php on line 26
我已经尝试解决这个问题好几个小时了。
【问题讨论】:
-
我们能看到你用来打开文件的代码吗?
-
这是 $key = file_get_contents('key.p12'); key.p12 和functions.php 在同一个目录,我真的不认为这是问题。