Skip to content

Instantly share code, notes, and snippets.

@kaizhuQin
kaizhuQin / http.conf
Created October 14, 2014 01:45
shell:apache端口映射
<VirtualHost *:80>
ServerName test.me
ServerAlias test.me
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
@kaizhuQin
kaizhuQin / xunsearch.php
Created September 11, 2014 09:34
php:xunsearch 索引建立 和 搜索
<?php
require '/data/sdk/php/lib/XS.php';
$xs = new XS('demo'); // 建立 XS 对象,项目名称为:demo
// 创建文档对象
$doc = new XSDocument;
@kaizhuQin
kaizhuQin / yii-model-register.php
Created July 21, 2014 01:42
php:yii用户注册表单验证
<?php
//视图层:register.php
//使用小物件生成form元素
$form=$this->beginWidget('CActiveForm');
?>
<!--用户名-->
<?php echo $form->labelEx($model,'username');?>
<?php echo $form->textField($model,'username');?>
<?php echo $form->error($model,'username');?>
@kaizhuQin
kaizhuQin / sftp-config.json
Created December 25, 2013 11:44
json:sftp-config.json
{
// sftp-config.json
// The tab key will cycle through the settings when first created
// Visit http://wbond.net/sublime_packages/sftp/settings for help
// sftp, ftp or ftps
"type": "sftp",
//上传前在本地保存
"save_before_upload": true,
@kaizhuQin
kaizhuQin / page_controller.phtml
Created December 20, 2013 07:56
zf:pagination
<!--
分页导航区的链接,独立出来。应用与单独对导航区进行布局与修饰 2013-1-16
-->
<!-- 首页链接 -->
<div class="pagination">
<ul>
<li><a href="<?php echo $this->url(array('page'=>$this->first));?>" title="首页">首页</a></li>
<!-- 上一页链接 -->
<li><a href="<?php echo $this->url(array('page' => $this->previous)); ?>" title="上一页">上一页</a></li>
@kaizhuQin
kaizhuQin / GetImageSrc.php
Last active July 26, 2016 04:07
php:获取字符串中 img src 的路径
<?php
/**
* 获取字符串中 img src 的路径
* @param array $out[4] 图片路径数组
*/
public function GetImageSrc($body)
{
if(!isset($body)){
return '';
}else{
@kaizhuQin
kaizhuQin / tpl.html
Last active December 26, 2015 16:29
html:template
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title></title>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<!-- <link rel="stylesheet" type="text/css" href=""> -->
</head>