个人项目中问题记录

来源:互联网 发布:职业女装品牌知乎 编辑:程序博客网 时间:2024/05/01 10:21
服务器环境安装配置
http://bbs.qcloud.com/thread-1316-1-1.html
http://www.centoscn.com/CentosServer/www/2014/0902/3643.html
http://www.2cto.com/os/201504/394141.html
php升级
mysql开启外连
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
flush privileges;
http://www.centoscn.com/image-text/config/2015/0812/5988.html
Apache配置Gzip压缩
<ifmodule mod_deflate.c>
    DeflateCompressionLevel 6
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/atom_xml
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE image/svg+xml
</ifmodule>
# 错误页面不显示apache版本信息
ServerSignature Off
#头信息不返回apache版本信息
ServerTokens Prod
PHP配置返回头不显示PHP版本信息
expose_php=off
Ajax跨域解决方案http://www.runoob.com/w3cnote/php-ajax-cross-border.html
SVN在服务器上部署要配置用户名和密码
tp关闭调试的话,__SELF__会缓存
linux后台运行http://www.ibm.com/developerworks/cn/linux/l-cn-nohup/
TP分页不显示最后一页 ‘尾页’文字
http://www.thinkphp.cn/topic/31193.html
TP上传文件保存错误,目录没权限(包括自动生成的日期目录)
联合查询不好用时
SELECT groupId,groupName FROM `user` AS u,group_detail AS d,`group` AS p WHERE u.id=d.userId AND d.groupId=p.id AND u.id=11
禁止目录执行PHP
<Directory /www/www.example.com/upload>
php_flag engine off
</Directory>
http://who0168.blog.51cto.com/253401/577309
THINKPHP更新数据时如果把主键包含在其中可能会出错
配置多域名要更改
NameVirtualHost 139.196.27.125:80
<VirtualHost 139.196.27.125:80>
    ServerAdmin f4ck_langzi@foxmail.com
    DocumentRoot /var/www/html/ck
    ServerName cy.qihetimes.com
    ErrorLog logs/cy.qihetimes.com-error_log
    CustomLog logs/cy.qihetimes.com-access_log common
</VirtualHost>
tp.htaccess必须和入口文件放在同一目录
mysql一对多查询,一条显示所有数据
select a.*,group_concat(b.name separator '-') as name from a left join b on a.id=b.id group by a.id;
mysql一对多查询,显示多的数目
https://segmentfault.com/q/1010000004261338
https
http://www.111cn.net/sys/linux/124001.htm
https://certbot.eff.org/docs/intro.html
https多域名配置vhosts无效?
<VirtualHost _default_:443>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/langziphp.top/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/langziphp.top/privkey.pem
ServerName plan.langziphp.top
DocumentRoot "/var/www/html/plan"
</VirtualHost>
laravel重定向无效可以在最后面加上->send()
http://stackoverflow.com/questions/27568147/laravel-constructor-redirect-is-not-working
return redirect()->action('Enterprise\UserController@login')->with('wrong','非法登录')->send();

0 0
原创粉丝点击