php 匹配中文所有字符 /[^x00-xff]+/u
/[^x00-xff]+/u //匹配双字节
/[\x{4e00}-\x{9fa5}]+/u //仅仅匹配UTF8的汉字
/[^x00-xff]+/u //匹配双字节
/[\x{4e00}-\x{9fa5}]+/u //仅仅匹配UTF8的汉字
1.开启子域名及部署 /app/config.php
// 域名部署
'url_domain_deploy' => true,
// 域名根,如thinkphp.cn
'url_domain_root' => 'kinmor.com',
2.添加路由规则: /simplewind/cmf/behavior/InitHookBehavior.php
Route::domain('m','mobile');
配置成功:将m.kinmor.com 指向 mobile模块
<?php
echo date('Y-m-01', strtotime('+1 month'));
echo "<br/>";
echo date('Y-m-t', strtotime('+1 month'));
echo "<br/>";
?>
在body后添加
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false" onmouseup="document.selection.empty()"
【源代码】
qj.rar
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>案例测试</title>
<link rel="stylesheet" href="css/all.css" />
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<style>
/* 公共样式 */
* { padding: 0; margin: 0; list-style: none; font-size: 14px; }
.hide { display: none; }
input { outline: none; }
/* 模拟下拉框 */
.select { position: relative; margin: 50px 0 0 100px; }
.select .input_in input { width: 188px; height: 20px; line-height: 20px; padding: 10px 0 10px 10px; border: 1px solid #d6d6d6; cursor: pointer; }
.select .city { position: absolute; top: 40px; left: 0; }
.select .city ul { width: 198px; border: 1px solid #d6d6d6; border-top: none; }
.select .city ul li { padding-left: 10px; width: 188px; height: 40px; line-height: 40px; cursor: pointer; }
</style>
</head>
<body>
<!-- End 模拟下拉框 -->
<div class="select">
<div class="input_in">
<input type="text" value="D.C" />
</div>
<div class="city hide">
<ul>
<li>New York1</li>
<li>New York2</li>
<li>New York3</li>
<li>New York4</li>
<li>New York5</li>
<li>New York6</li>
</ul>
</div>
</div>
<!-- End 模拟下拉框 -->
<script type="text/javascript">
$(function(){
//模拟下拉框
$('.select input').on('click',function(){
if($('.select .city').is('.hide')){
$('.select .city').removeClass('hide');
}else{
$('.select .city').addClass('hide');
}
})
$('.select ul li').on('click',function(){
$('.select input').val($(this).html());
$('.select .city').addClass('hide');
$('.select input').css('border-bottom','1px solid $d6d6d6');
})
$('.select ul li').hover(
function(){
$(this).css({'backgroundColor':'#fd9','font-size':'18px'});
},function(){
$(this).css({'backgroundColor':'#fff','font-size':'14px'});
}
)
})
</script>
</body>
</html>