上传h5ai文件到网站根目录
h5ai本地下载地址:h5ai-0.29.0.zip,将文件解压后放在网站根目录。
如果存在文件,但读不出来,可能原因就是php已禁用scandir函数了,请修改php.ini解决。
disable_functions=passthru,exec,system,chroot,scandir,...
删掉scandir,字样,再重启php即可:/etc/init.d/php-fpm restart。
把h5ai程序_h5ai中private和public两个文件夹中的cache目录权限设置为777。
H5AI V0.29中文文件名、文件、URL乱码解决方法:
在h5ai的private\php\core下有个class-context.php文件
然后将85行的代码替换为如下:
$encoded_parts[] = rawurlencode(mb_convert_encoding($part, "UTF-8", "GBK"));
以及94行替换为如下:
return Util::normalize_path($this->setup->get('ROOT_PATH') . '/' .mb_convert_encoding(rawurldecode($rel_href), "GBK", "UTF-8"));
Comments