admin
2016-6-1
请赋予目录读写权限.
例: 在lnmp环境目录中 执行 chmod -R a+wr /home/wwwroot/你的虚拟目录
伪静态规则未安装. 默认根目录提供了 apache的伪静态规则, 以及IIS7.5以上的 Web.config, Web.config需要IIS开启 重写规则模块!
如果你是nginx环境, 则你需要手动来到 nginx conf目录进行配置
nginx conf 通常路径为 /usr/local/nginx/conf/nginx.conf 这是默认配置
如果你采用了虚拟目录则需要来到 /usr/local/nginx/conf/vhost 找到你的conf文件
程序根目录中的 nginx.conf 中的内容 则是伪静态规则 将它添加到 .conf文件当中
/usr/local/nginx/conf/nginx.conf 添加示例(这是一个全局方法)
server
{
listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;
server_name www.lnmp.org;
index index.html index.htm index.php;
root /home/wwwroot/default;
#error_page 404 /404.html;
include enable-php.conf;
#这是伪静态规则
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
location /nginx_status...
...
..
...
../usr/local/nginx/conf/vhost/你的.conf 添加示例(目录专属方法)
server
{
listen 80;
#listen [::]:80;
server_name test.hyyyp.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/test.hyyyp.com;
include none.conf;
#error_page 404 /404.html;
# 这是伪静态规则
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
........
........
.......你需要到 php.ini 删除scandir的函数禁用. 你可以在php.ini中搜索 scanfdir , 你就可以看到 disable_functions = xxx,xxx,xxx,scandir
将scandir 删除后 即可. 注意 逗号(,) 重启WEB服务器即可
发生错误文件: XXXXXX\HYBBS\HY\HY_SQL.php
| 82: | } |
| 83: | $this->pdo = new PDO($dsn, $this->username, $this->password, $this->option); |
你需要到php.ini 开启 PDO扩展
php.ini中搜索 php_pdo_mysql 去掉前面的 ; 分号 保存 重启PHP进程即可!
如果你使用的非mysql 请去掉php_pdo_xxx 你的数据库扩展
问题同上 (4) 你需要开启PDO
解决方法: http://bbs.hyphp.cn/t/39.html