09 2015 档案
验证码 mewebstudio/captcha
摘要:composer require mews/captchahttps://github.com/mewebstudio/captcha 阅读全文
posted @ 2015-09-27 22:33 jzfan
nginx安全相关设置
摘要:Nginx默认是显示版本号,隐藏# vim nginx.conf在http {—}里加上server_tokens off; 如:http {……省略server_tokens off;http://www.cnblogs.com/ilanni/archive/2014/10/08/4010321.... 阅读全文
posted @ 2015-09-26 23:22 jzfan
获取网页中图片
摘要:]*>/i', $text, $match); //打印出match print_r($match); 阅读全文
posted @ 2015-09-21 22:36 jzfan
遍历一个文件夹下的所有文件和子文件夹
摘要:function listDir($dir = '.'){ if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if($file == '.' || $f... 阅读全文
posted @ 2015-09-21 22:21 jzfan
URL解析
摘要:取脚本扩展名 #测试网址: http://localhost/blog/testurl.php?id=5//获取域名或主机地址 echo $_SERVER['HTTP_HOST'].""; #localhost//获取网页地址 echo $_SERVER['PHP_SELF'].""... 阅读全文
posted @ 2015-09-21 22:13 jzfan
相对路径
摘要:写一个函数,算出两个文件的相对路径 阅读全文
posted @ 2015-09-21 22:12 jzfan
SupeSite常用sql语句
摘要:“数据库升级”打开数据SQL语句输入表单。1、清空数据表supe_robotitems和supe_robotmessages:TRUNCATE TABLE `supe_robotitems`;TRUNCATE TABLE `supe_robotmessages`;这两个表是装载采集内容的,如果要清空... 阅读全文
posted @ 2015-09-21 10:33 jzfan
supesite资讯调用
摘要:#date('m-d', $value['dateline'])#$value[sub... 阅读全文
posted @ 2015-09-19 10:51 jzfan
laravel 多对多 belonsToMany
摘要:建库,建modelphp artisan make:migration create_tags_table --create=tagsphp artisan make:model Tag加字段increments('id'); $table->string('name'); ... 阅读全文
posted @ 2015-09-14 23:38 jzfan
laracasts/flash
摘要:一个flash消息的插件composer require laracasts/flashconfig\app.php//provider'Laracasts\Flash\FlashServiceProvider'//aliases'Flash' => 'Laracasts\Flash\Flash'... 阅读全文
posted @ 2015-09-14 21:12 jzfan
laravel session flash
摘要:简单的例子,更高级的插件应用在components目录控制器放入,flash是一次性的,put不是\Session::flash('flash_msg','Your article has been created!');视图显示 @if (Session::has('flash_ms... 阅读全文
posted @ 2015-09-14 20:22 jzfan
laravel event
摘要:EventServiceProvidernamespace App\Providers;class EventServiceProvider extends ServiceProvider{ protected $listen = [ 'App\Events\UserHasReg... 阅读全文
posted @ 2015-09-14 12:02 jzfan
laravel 模型绑定
摘要:namespace App\Providers;class RouteServiceProvider extends ServiceProvider{ public function boot(Router $router) { parent::boot($router);... 阅读全文
posted @ 2015-09-14 01:25 jzfan
laravel blog 二
摘要:修改数据库articles结构,添加到user表的外键,migrate:refresh public function up() { Schema::create('articles', function (Blueprint $table) { $t... 阅读全文
posted @ 2015-09-14 00:03 jzfan
sublime 插件
摘要:Sublime Text Refresh Folder Hotkey Sublime Text Refresh Folder Hotkey Sublime Text Refresh Folder Hotkey Open Sublime Text. Select Preferences from th 阅读全文
posted @ 2015-09-13 22:27 jzfan
vsftpd
摘要:安装 yum install vsftpd 重启、自启动、防火墙 添加虚拟用户 adduser -d /opt/test_ftp -g ftp -s /sbin/nologin testpasswd test 使用命令(adduser)添加test用户,不能登录系统(-s /sbin/nologin 阅读全文
posted @ 2015-09-13 20:11 jzfan
服务器环境配置nginx / php / php-fpm(二)
摘要:php.ini调优 一、 最大内存: memory_limit 表示单个进程能够占用的最大内存,默认为128M,适用于大多数中小型网站。设置一个合适的数值取决于以下因素: php能够使用的最大内存。如果你的主机内存为2G,其中还有其他的服务,例如mysql,nginx,memcache等,那么设置为 阅读全文
posted @ 2015-09-13 16:22 jzfan
服务器环境配置nginx / php / php-fpm(一)
摘要:在配置文件中有 include=/etc/php-fpm.d/*.conf , 表示池定义 pool definition 在php-fpm.d目录下 建立 /etc/nginx/conf.d/example.conf 阅读全文
posted @ 2015-09-13 01:36 jzfan
vmware虚拟机安装centos,配置PHP、mysql
摘要:1.mini版安装成功后不能进入,一直卡在进度条 开机时更改为单人模式,更改/etc/initttab设置,默认为5,改为3 进入后首先yum update2.yum安装gcc,perl,安装vmware tools 光驱加载VM目录下的windows.iso文件,然后mount -t iso966... 阅读全文
posted @ 2015-09-11 23:11 jzfan
linux 输出重定向
摘要:格式:command-line1 [1-n] > file或文件操作符或设备上面命令意思是:将一条命令执行结果(标准输出,或者错误输出,本来都要打印到屏幕上面的) 重定向其它输出设备(文件,打开文件操作符,或打印机等等)1,2分别是标准输出,错误输出。#显示当前目录文件 test.sh test1.... 阅读全文
posted @ 2015-09-11 15:40 jzfan
laravel blog 一
摘要:路由Route::resource('articles','ArticleController');modelclass Article extends Model{ //添加可填充的字段 protected $fillable = [ 'title', 'body', ... 阅读全文
posted @ 2015-09-11 00:07 jzfan
dede:channelartlist currentstyle高亮显示
摘要:我 们在用DEDECMS建站时,常常会做二级栏目的功能,既要用到二级栏目,也就要通过DEDE标签再套标签的方式来实现调用,而DEDECMS多层标签调 用只支持channelartlist,也就是说我们只能通过dede:channelartlist标签才能调出二级栏目,我们用 dede:channel 阅读全文
posted @ 2015-09-08 09:58 jzfan
dede调用导航/幻灯
摘要:带有二级子栏目的栏目的调用,这类网站用于信息分类比较多的网站,其样式图如下: 这种栏目是比较常见的,其dedecms调用代码如下: 添加样式 幻灯 阅读全文
posted @ 2015-09-06 11:57 jzfan
rmp 安装LNMP环境
摘要:系统环境:CentOS 6.6下载 PHP 源码包# wget http://cn2.php.net/distributions/php-5.6.0.tar.xz# xz -d php-5.6.0.tar.xz# tar xf php-5.6.0.tar -C /usr/local/src/安装依赖... 阅读全文
posted @ 2015-09-04 20:23 jzfan