得到占用443端口的进程ID,发现是VisualSVNServer.exe占用了它。 修改VisualSVN Server Manager的端口方法如下: (1)打开VisualSVN Server Manager (2)点击根节点“VisualSVN Server Manager (Local)” (3)右键-Properties (4)Network选项卡,Server Port选为8443
var url=window.URL.createObjectURL(obj.files[0]);[/url]获得一个http格式的url路径,这个时候就可以设置到<img>中显示了。
window.webkitURL和window.URL是一样的,window.URL标准定义,window.webkitURL是webkit内核的实现(一般手机上就是使用这个),还有火狐等浏览器的实现。
#666
#667
选择.htaccess
Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
#668
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>垂直居中Demo</title> <style> #container{ height:300px; background:#d6d6d6; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; justify-content:center; align-items: center; } #center{ width:100px; height:100px; background-color:#666; color:#fff; font-weight:bold; font-size:18px; display:flex; /*这个写在这只是为了#center这几个字的垂直居中*/ justify-content:center; align-items: center; } </style> </head> <body> <div id='container'> <div id = 'center'>#center</div> </div> </body> </html>
#669
<style> .prm { width:300px; height:300px; background:green; display:table-cell; text-align:center; vertical-align:middle; } </style> <div class="pr" style="display:none"> <p class="c">单行居中 单行居中</p> </div> <div class="prm"> <p class="c"> 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 多行垂直居中 </p> </div>
#670
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Client] "Enabled"=dword:00000000 "DisabledByDefault"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server] "Enabled"=dword:00000000 "DisabledByDefault"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Client] "Enabled"=dword:00000000 "DisabledByDefault"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server] "Enabled"=dword:00000000 "DisabledByDefault"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client] "DisabledByDefault"=dword:00000001 "Enabled"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server] "Enabled"=dword:00000000 "DisabledByDefault"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client] "Enabled"=dword:00000000 "DisabledByDefault"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server] "Enabled"=dword:00000000 "DisabledByDefault"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client] "Enabled"=dword:00000001 "DisabledByDefault"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server] "Enabled"=dword:00000001 "DisabledByDefault"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client] "DisabledByDefault"=dword:00000000 "Enabled"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server] "DisabledByDefault"=dword:00000000 "Enabled"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client] "DisabledByDefault"=dword:00000000 "Enabled"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server] "Enabled"=dword:00000001 "DisabledByDefault"=dword:00000000
双击执行,重启服务器 TLS1.2.reg
#671
var App = getApp(); // pages/about/about.js Page({ /** * 页面的初始数据 */ data: { "content": '广西南宁共振广告有限公司,2008年成立于南宁,是一家以“品牌咨询+品牌设计+品牌策划+品牌落地”于一体的品牌服务平台,通过360°全景式纵深品牌打造,从品牌标识设计、VI设计、空间设计、包装、海报等多维度构建完善的品牌价值链,致力于以实战服务中国企业,以品牌推动中国成长。公司创立至今,已是当之无愧的品牌实战专家,客户涵盖国内外地产、金融、IT、汽车、服装时尚、奢侈品、能源、机械、快速消费品等各行业著名的企业,深受客户信赖。我们坚持以实力深耕市场,力求达成艺术与商业之间、客户与市场之间、虚拟与现实之间的价值共生,将企业打造成为一个能为客户提供综合化', "content2": '更换内容21321', "content3": '2222222222222更换内容21321', radioCheckVal: 0, all: [{ one: "公司介绍", two: '../../images/ab2.gif', two1: '../../images/ab5.gif' }, { one: "公司理念", two: '../../images/ab3.gif', two1: '../../images/ab4.gif' }, { one: "核心优势", two: '../../images/ab4.gif', two1: '../../images/ab3.gif' }, { one: "公司使命", two: '../../images/ab5.gif', two1: '../../images/ab2.gif' }], oall:{ } }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { App.editTabBar(this); this.setData({ "oall": this.data.all })//保存初始图片数据 2018.01.05 }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { }, //更换内容 getnewcontent:function(n){ var cc = (n.currentTarget.dataset.c); var ncc ='content'+cc; // var adata =''; var id = n.currentTarget.dataset.id; //打印可以看到,此处已获取到了包含id、title、和content的对象 var that = this; //var two = all[id].two = all[id].two1; this.setData({ "all":this.data.oall },function(){ that.data.all[id].two = that.data.all[id].two1; //console.log(that.data.all); var all = that.data.all; that.setData({ "content": that.data[ncc], "all": all, "id": id }) }); } })
<!-------------banner 开始--------------> <image style='width:100%;' src='../../images/ab0.png' mode="widthFix" ></image> <!-------------banner 结束--------------> <view class="about" style="background:url('https://hhh.liangtianmei.com/images/bjjj.png');"> <!-------------标题 开始--------------> <view class='title'> <view class='zuo'> <view class='xian'></view> <view class='yuan'>●</view> </view> <view class='wz'> <text class='yw'>ABOUT SU\n</text> <text class='zw'>关于我们\n</text> </view> <view class='you'> <view class='yuan'>●</view> <view class='xian'></view> </view> </view> <!-------------标题 结束--------------> <!-------------导航 开始--------------> <view class='nav'> <view class='meiyi'> <block wx:for="{{all}}"> <view class="dg" bindtap="getnewcontent" data-id="{{index}}" data-c='{{index+1}}' style="{{index == id?' border:1rpx solid red':'border:1rpx solid gainsboro;'}}"> <image src="{{item.two}}" mode="widthFix" data-index="{{index}}"></image> <text>{{item.one}}</text> </view> </block> <!-- <view class='dg' bindtap="getnewcontent" data-c='2'> <image src='../../images/ab2.gif' mode="widthFix"></image>\r\n <text>公司介绍</text> </view> <view class='dg' bindtap="getnewcontent" data-c='3'> <image src='../../images/ab3.gif' mode="widthFix"></image>\r\n <text>公司理念</text> </view> <view class='dg'> <image src='../../images/ab4.gif' mode="widthFix"></image>\r\n <text>核心优势</text> </view> <view class='dg'> <image src='../../images/ab5.gif' mode="widthFix"></image>\r\n <text>公司使命</text> </view>--> </view> </view> <!-------------导航 结束--------------> <!-------------图文 开始--------------> <view class='nr'> <image src='../../images/ab1.png' mode="widthFix"></image> <text>{{content}}</text> </view> <!-------------图文 结束--------------> </view> <import src="../template/tabBar.wxml" /> <template is="tabBar" data="{{tabBar: tabBar}}" />
微信模板文件wxml循坏遍历怎么json键名变量??
getnewcontent:function(n){ var cc = (n.currentTarget.dataset.c); var ncc ='content'+cc; var id = n.currentTarget.dataset.id; this.setData({ "content": this.data[ncc], id:id }) } <block wx:for="{{all}}"> <view class='dg' data-id="{{index}}" bindtap="getnewcontent" data-c='{{index+1}}'> <block wx:if="{{index==id}}"> <image src='{{item.two1}}' mode="widthFix"></image>\r\n </飙泪ock> <block wx:else> <image src='{{item.two}}' mode="widthFix"></image>\r\n </飙泪ock> <text>{{item.one}}</text> <iew> </飙泪ock>
#672
https://www.random.org/integers/?num=1&min=100000&max=999999&col=1&base=10&format=plain&rnd=new
#673
<template name="tabBar"> <view class="flex-h flex-hsb tab-bar" style="color: {{tabBar.color}}; background: {{tarBar.backgroundColor}}; {{tabBar.position=='top'? 'top: 0' : 'bottom: 0'}}; {{tabBar.borderStyle? (tabBar.position=='top'? 'border-bottom: solid 1px '+tabBar.borderStyle + ';' : 'border-top: solid 1px '+tabBar.borderStyle + ';') : ''}}"> <block wx:for="{{tabBar.list}}" wx:key="pagePath"> <navigator url="{{item.pagePath}}" open-type="redirect" class="menu-item" style="{{item.active? 'color: '+(item.selectedColor? item.selectedColor : tabBar.selectedColor) : ''}}"> <image src="{{item.selectedIconPath}}" wx:if="{{item.active}}"></image> <image src="{{item.iconPath}}" wx:if="{{!item.active}}"></image> <text style="color:{{item.selectedColor}}" wx:if="{{item.active}}">{{item.text}}</text> <text style="color:{{item.color}}" wx:if="{{!item.active}}">{{item.text}}</text> </navigator> </block> </view> </template>
#674
// pages/about/about.js Page({ /** * 页面的初始数据 */ data: { "content": '广西南宁共振广告有限公司,2008年成立于南宁,是一家以“品牌咨询+品牌设计+品牌策划+品牌落地”于一体的品牌服务平台,通过360°全景式纵深品牌打造,从品牌标识设计、VI设计、空间设计、包装、海报等多维度构建完善的品牌价值链,致力于以实战服务中国企业,以品牌推动中国成长。公司创立至今,已是当之无愧的品牌实战专家,客户涵盖国内外地产、金融、IT、汽车、服装时尚、奢侈品、能源、机械、快速消费品等各行业著名的企业,深受客户信赖。我们坚持以实力深耕市场,力求达成艺术与商业之间、客户与市场之间、虚拟与现实之间的价值共生,将企业打造成为一个能为客户提供综合化', "content2": '更换内容21321', "content3": '2222222222222更换内容21321' }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { }, //更换内容 getnewcontent:function(n){ var cc = (n.currentTarget.dataset.c); var ncc ='content'+cc; console.log(ncc); this.setData({ "content": this.data[ncc], }) } })
<!-------------banner 开始--------------> <image style='width:100%;' src='../../images/ab0.png' mode="widthFix" ></image> <!-------------banner 结束--------------> <view class="about" style="background:url('https://hhh.liangtianmei.com/images/bjjj.png');"> <!-------------标题 开始--------------> <view class='title'> <view class='zuo'> <view class='xian'></view> <view class='yuan'>●</view> </view> <view class='wz'> <text class='yw'>ABOUT SU\n</text> <text class='zw'>关于我们\n</text> </view> <view class='you'> <view class='yuan'>●</view> <view class='xian'></view> </view> </view> <!-------------标题 结束--------------> <!-------------导航 开始--------------> <view class='nav'> <view class='meiyi'> <view class='dg' bindtap="getnewcontent" data-c='2'> <image src='../../images/ab2.gif' mode="widthFix"></image>\r\n <text>公司介绍</text> </view> <view class='dg'> <image src='../../images/ab3.gif' mode="widthFix"></image>\r\n <text>公司理念</text> </view> <view class='dg'> <image src='../../images/ab4.gif' mode="widthFix"></image>\r\n <text>核心优势</text> </view> <view class='dg'> <image src='../../images/ab5.gif' mode="widthFix"></image>\r\n <text>公司使命</text> </view> </view> </view> <!-------------导航 结束--------------> <!-------------图文 开始--------------> <view class='nr'> <image src='../../images/ab1.png' mode="widthFix"></image> <text>{{content}}</text> </view> <!-------------图文 结束--------------> </view>
alert(json.lastMonth[dep]);
使用中括号的方式就可以用变量key值
js json键名变量
js变量名变量
#675
var app = getApp() //构造令牌 // 在需要使用的js文件中,导入js //var util = require('../../utils/util.js'); //构造令牌 使用服务器时间戳 var utilMd5 = require('../../utils/md5.js'); var util = require('../../utils/util.js'); var ttken = 'JLI5vvqq0KRnzfla';//密钥 var ttime = parseInt(Date.parse(new Date()) / 1000);//时间 秒 //var ttime = util.ntime(); var ntoken = ttken + ttime; var token = utilMd5.hexMD5(ntoken); //console.log(token); //end Page({ /** * 页面的初始数据 */ data: { token:0, tokenid: 0 }, onLoad: function () { //console.log('token: ' + token); var params = { 'name': 'json', 'age': 26 }; //util.makeusertoken() //初始化 验证码 util.updatenew('https://hhh.*****.com/index.php/Home/Wxapp/code/token/' + token, token,this); //获取验证码图片 var tokenid = wx.getStorageSync('tokenid'); //util.updatenew('https://hhh.*****.com/index.php/Home/Wxapp/getcode/token/' + token + '/tokenid/' + tokenid+'/'); this.setData({ token: token, tokenid:tokenid }) }, changing:function(){ util.updatenew('https://hhh.*****.com/index.php/Home/Wxapp/code/token/' + token, token, this); var tokenid = wx.getStorageSync('tokenid'); this.setData({ token: token, tokenid: tokenid }) } }) //ajax(method, url, data, success)
1.生成令牌 <image style="height:40px;width:100px;margin-top:10px;" bindtap="changing" id="codeyzmm" src="https://hhh.*****.com/index.php/Home/Wxapp/getcode/token/{{token}}/tokenid/{{tokenid}}/" ></image>
const formatTime = date => { const year = date.getFullYear() const month = date.getMonth() + 1 const day = date.getDate() const hour = date.getHours() const minute = date.getMinutes() const second = date.getSeconds() return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') } const formatNumber = n => { n = n.toString() return n[1] ? n : '0' + n } //服务器时间戳 function ntime(utilMd5, that,url){ wx.request({ url: 'https://hhh.*****.com/ntime.php',//请修改为你服务器 data: { }, header: { 'content-type': 'application/json' }, success: function (res) { //return res; var ttken = 'JLI5vvqq0KRnzfla';//密钥 //var ttime = parseInt(Date.parse(new Date()) / 1000);//时间 秒 var ttime =res.data;//util.ntime(); var ntoken = ttken + ttime; var token = utilMd5.hexMD5(ntoken); //console.log(ntoken); //return token; // var url = 'https://hhh.*****.com/index.php/Home/Product/index'; updatenew(url, token, that); } }) } //更新数据 function updatenew(url, token, that) { wx.request({ url: url,//'https://hhh.*****.com/index.php/Home/Product/index', //仅为示例,并非真实的接口地址 /*data: { token: token },*/ method: 'GET', header: { 'content-type': 'application/json' // 默认值 }, success: function (res) { // alert(res.data) // res.data.content = app.convertHtmlToText(res.content) /*that.setData({ textdata: res.data }); console.log (res.data)*/ // that.setData(res.data) /*that.setData({ all: res.data//第一个data为固定用法,第二个data是json中的data })*/ //console.log(token); //res.data.jzzz = 1; if (res.data.tokenid){ //保存token id wx.setStorageSync('tokenid', res.data.tokenid); } if (that){ that.setData(res.data) //that.setData({ //jzzz:1, //jzzzs:'', //codeimgurl: res.data.codeimgurl, //all: res.data //res // imageUrl: "../images/sp_07.png"//触发事件时的图片 //}) } } }) } //构造令牌 // 在需要使用的js文件中,导入js //var util = require('../../utils/util.js'); /*var ttken ='JLI5vvqq0KRnzfla';//密钥 var ttime = parseInt(Date.parse(new Date())/1000);//时间 秒 //var ttime = util.ntime(); var ntoken=ttken+ttime; var token = utilMd5.hexMD5(ntoken); console.log(token);*/ //end //随机字符窜 function randomString(len) { len = len || 32; var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhioOLl,9gq,Vv,Uu,I1jkmnprstwxyz/*~!@#¥%……&*()+=-2345678'; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/ var maxPos = $chars.length; var pwd = ''; for (var i = 0; i < len; i++) { pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); } return pwd; } //document.write(randomString(32)); /*伪身份凭证*/ function makeusertoken(){ //console.log(randomString(9)) var ro = randomString(9); //存储随机字符1 wx.setStorageSync('ros', ro); //var code = ro.charCodeAt(); //var nro = wx.getStorageSync('ros') //console.log(strToBinary(ro)); //console.log(binaryToStr('1000010 1000010 111000 1101011 1001101 1000000 110001 1101100 1111001')); } //将字符串转换成二进制形式,中间用空格隔开 function strToBinary(str) { var result = []; var list = str.split(""); for (var i = 0; i < list.length; i++) { if (i != 0) { result.push(" "); } var item = list[i]; var binaryStr = item.charCodeAt().toString(2); result.push(binaryStr); } return result.join(""); } //将二进制字符串转换成Unicode字符串 function binaryToStr(str) { var result = []; var list = str.split(" "); for (var i = 0; i < list.length; i++) { var item = list[i]; var asciiCode = parseInt(item, 2); var charValue = String.fromCharCode(asciiCode); result.push(charValue); } return result.join(""); } /*end*/ //获取访问者的openid /*end*/ module.exports = { formatTime: formatTime, ntime: ntime, updatenew: updatenew, makeusertoken: makeusertoken }
wx.navigateTo({ url: 'test?id=1'//实际路径要写全 })
//test.js Page({ onLoad: function(option){ console.log(option.id) } })
参数与路径之间使用?分隔,参数键与参数值用=相连,不同参数用&分隔;
test?id=1 中id为参数键,1 为参数值
在目的页面中onLoad()方法中option对象即为参数对象,可以通过参数键来取出参数值
#676
1.css方案
<view class="{{isFold ?'flod':'extend' }}" bindtap="flodFn"> 我是一个很长的文字 </view> .flod{ //折叠样式 } .extend{ //展开样式 } flodFn:function(){ this.setData({ isFold: !this.isFold }); }
2.动态渲染方案
<view bindtap="flodFn"> <view wx:if="{{isFold}}" > 我是一个很长的文字 </view> <view wx:else> 我是一个很长的文字 </view> </view> flodFn:function(){ this.setData({ isFold: !this.isFold }); }
显示被隐藏的元素,并隐藏已显示的元素
$("button").click(function(){ $("p").toggle(); });
#677
#678
$the_host = $_SERVER['HTTP_HOST']; //取得当前域名 $the_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; //判断地址后面部分 //$the_url = strtolower($the_url);//将英文字母转成小写 if($the_url=="/index.php"){ //判断是不是首页 $the_url="";//如果是首页,赋值为空 } if($the_host !== 'www.lizhenqiu.com'){ //如果域名不是带www的网址那么进行下面的301跳转 header('HTTP/1.1 301 Moved Permanently');//发出301头部 header('Location:http://www.lizhenqiu.com'.$the_url);//跳转到带www的网址 //header后的PHP代码还会被执行 .确保重定向后,后续代码不会被执行 exit; }
#679
#680
/GZphp/Lib/Action/Admin/
public function doUpdateurl() { //echo getlang();exit; $llllggg=1; if(getlang()=='en') $llllggg=3; $where=' lang= '.$llllggg; //修复后台多语言 $this->assign ( 'waitSecond', 0); $moduleid = intval($_GET['moduleid']); extract($_GET,EXTR_SKIP); if($moduleid<=0 && $catids[0] <= 0){ if($this->module && !$_SESSION['moduleids']){ foreach($this->module as $moduleid=>$r){ $tablename=C('DB_PREFIX').$this->module[$moduleid]['name']; $db=D(''); $db = DB::getInstance(); $tables = $db->getTables(); $Fields=$db->getFields($tablename); foreach ( $Fields as $key =>$r){ if($key=='url') $_SESSION['moduleids'][] = $moduleid; } } } $doid = $doid ? intval($doid) : 0; if(!isset($_SESSION['moduleids'][$doid])){ unset($_SESSION['moduleids']); $forward = U("Createhtml/updateurl"); $this->assign ( 'jumpUrl', $forward); $this->success(L('create_update_success')); }else{ $moduleid = $_SESSION['moduleids'][$doid]; $module=$this->module[$moduleid]['name']; $dao = M($module); $p = max(intval($p), 1); $start = $pagesize*($p-1); if(!isset($count)){ $count = $dao->where($where)->count(); } $pages = ceil($count/$pagesize); if($count){ $list = $dao->field('id,catid,url')->where($where)->limit($start . ',' . $pagesize)->select(); foreach($list as $r) { if($r['islink']) continue; $url = geturl($this->categorys[$r['catid']],$r,$this->Urlrule); unset($r['catid']); $r['url'] = $url['0']; if($url) $dao->save($r); } } if($pages > $p) { $p++; $creatednum = $start + count($list); $percent = round($creatednum/$count, 2)*100; $urlarray=array( 'doid' => $doid, 'dosubmit' => 1, 'count' => $count, 'pages' => $pages, 'p' => $p, 'pagesize' => $pagesize, ); $message = L('updating').$this->module[$moduleid]['title'].L('create_update_count').$count.L('create_update_num').$creatednum.L('items').$percent.L('items1'); $forward = U("Createhtml/".ACTION_NAME,$urlarray); $this->assign ( 'jumpUrl', $forward); $this->success($message); } else { $doid++; $urlarray=array( 'doid' => $doid, 'dosubmit' => 1, 'p' => 1, 'pagesize' => $pagesize, ); $message = L('start_updating').$this->module[$moduleid]['title']." ..."; $forward = U("Createhtml/".ACTION_NAME,$urlarray); $this->assign ( 'jumpUrl', $forward); $this->success($message); } } }elseif($moduleid){ $module=$this->module[$moduleid]['name']; $dao = M($module); $p = max(intval($p), 1); $start = $pagesize*($p-1); if(is_array($catids) && $catids[0] > 0){ $cids = implode(',',$catids); $where = $where." catid IN($cids) "; $_SESSION['catids'] = $catids; } if(!$catids && $_SESSION['catids'] && $_SESSION['catids'][0] > 0){ $catids = implode(',',$_SESSION['catids']);; $where = $where." catid IN($catids) "; } if(!isset($count)){ $count = $dao->where($where)->count(); } $pages = ceil($count/$pagesize); if($count){ $list = $dao->field('id,catid,url')->where($where)->limit($start . ',' . $pagesize)->select(); foreach($list as $r) { if($r['islink']) continue; $url = geturl($this->categorys[$r['catid']],$r,$this->Urlrule); unset($r['catid']); $r['url'] = $url['0']; if($url) $dao->save($r); } } if($pages > $p) { $p++; $creatednum = $start + count($list); $percent = round($creatednum/$count, 2)*100; $urlarray=array( 'moduleid' => $moduleid, 'dosubmit' => 1, 'count' => $count, 'pages' => $pages, 'p' => $p, 'pagesize' => $pagesize, ); $message = L('create_update_count').$count.L('create_update_num').$creatednum.L('items').$percent.L('items1'); $forward = U("Createhtml/updateurl",$urlarray); $this->assign ( 'jumpUrl', $forward); $this->success($message); } else { unset($_SESSION['catids']); $forward = U("Createhtml/updateurl"); $this->assign ( 'jumpUrl', $forward); $this->success(L('create_update_success')); } }else{ //按照栏目更新url extract($_GET,EXTR_SKIP); $doid = $doid ? intval($doid) : 0; if(empty($_SESSION['catids']) && $catids){ if($catids[0] == 0) { foreach($this->categorys as $id=>$cat) { if($cat['child'] || $cat['type']!=0 || $cat['module']=='Page') continue; $catids[] = $id; } } $_SESSION['catids'] = $catids; }else{ $catids =$_SESSION['catids']; } if(!isset($catids[$doid])){ unset($_SESSION['catids']); $forward = U("Createhtml/updateurl"); $this->assign ( 'jumpUrl', $forward); $this->success(L('create_update_success')); }elseif($catids[$doid]<=0){ $forward = U("Createhtml/updateurl"); $this->assign ( 'jumpUrl', $forward); $this->success(L('create_update_success')); }else{ $id = $catids[$doid]; $module=$this->categorys[$id]['module']; $dao = M($module); $where = $where."catid=$id"; $p = max(intval($p), 1); $start = $pagesize*($p-1); if(!isset($count)){ $count = $dao->where($where)->count(); } $pages = ceil($count/$pagesize); if($count){ $list = $dao->field('id,catid,url')->where($where)->limit($start . ',' . $pagesize)->select(); foreach($list as $r) { if($r['islink']) continue; $url = geturl($this->categorys[$r['catid']],$r,$this->Urlrule); unset($r['catid']); $r['url'] = $url['0']; if($url) $dao->save($r); } } if($pages > $p) { $p++; $creatednum = $start + count($list); $percent = round($creatednum/$count, 2)*100; $urlarray=array( 'doid' => $doid, 'dosubmit' => 1, 'count' => $count, 'pages' => $pages, 'p' => $p, 'pagesize' => $pagesize, ); $message = L('updating').$this->categorys[$id]['catname'].L('create_update_count').$count.L('create_update_num').$creatednum.L('items').$percent.L('items1'); $forward = U("Createhtml/".ACTION_NAME,$urlarray); $this->assign ( 'jumpUrl', $forward); $this->success($message); } else { $doid++; $urlarray=array( 'doid' => $doid, 'dosubmit' => 1, 'p' => 1, 'pagesize' => $pagesize, ); $message = L('start_updating').$this->categorys[$id]['catname']." ..."; $forward = U("Createhtml/".ACTION_NAME,$urlarray); $this->assign ( 'jumpUrl', $forward); $this->success($message); } } } }
/GZphp/Common/
function geturl($cat,$data='',$Urlrule=''){ //$Urlrule =F('Urlrule'); $id=$data['id']; $URL_MODEL =C('URL_M'); if(APP_LANG)$lang = getlang(); $parentdir = $cat['parentdir']; $catdir = $cat['catdir']; if(!$catdir){ return false; //修复后台多语言 } $year = date('Y',$data['createtime']); $month = date('m',$data['createtime']); $day = date('d',$data['createtime']); $module = $cat['module']; $moduleid =$cat['moduleid']; $catid=$cat['id']; if($cat['ishtml']){ if($cat['urlruleid'] && $Urlrule){ $showurlrule = $Urlrule[$cat['urlruleid']]['showurlrule']; $listurlrule = $Urlrule[$cat['urlruleid']]['listurlrule']; }else{ echo 'This cat has not urlruleid or no Urlrule.';exit; } }else{ if($URL_MODEL==0){ $langurl = $lang ? '&l='.LANG_NAME : ''; if($id){ $url[] = U("Home/$cat[module]/show?id=$id".$langurl); $url[] = U("Home/$cat[module]/show?id=".$id.$langurl.'&'.C('VAR_PAGE').'={$page}'); }else{ $url[] = U("Home/$cat[module]/index?id=$cat[id]".$langurl); $url[] = U("Home/$cat[module]/index?id=$cat[id]$langurl&".C('VAR_PAGE').'={$page}'); } $urls = str_replace('g=Admin&','',$url); $urls = str_replace('g=Home&','',$url); }else{ $urlrule = explode(':::',C('URL_URLRULE')); $showurlrule = $urlrule[0]; $listurlrule = $urlrule[1]; } } if(empty($urls)){ $index = $URL_MODEL==1 ? __ROOT__.'/index.php/' : __ROOT__.'/'; $langurl = $lang ? $lang.'/' : ''; if($id){ $urls = str_replace(array('{$parentdir}','{$module}','{$moduleid}','{$catdir}','{$year}','{$month}','{$day}','{$catid}','{$id}'),array($parentdir,$module,$moduleid,$catdir,$year,$month,$day,$catid,$id),$showurlrule); }else{ $urls = str_replace(array('{$parentdir}','{$module}','{$moduleid}','{$catdir}','{$year}','{$month}','{$day}','{$catid}','{$id}'),array($parentdir,$module,$moduleid,$catdir,$year,$month,$day,$catid,$id),$listurlrule); } $urls = explode('|',$urls); $urls[0]=$index.$langurl.$urls[0]; $urls[1]=$index.$langurl.$urls[1]; } return $urls; }
#681
检测端口是否开启
netstat -ano -p tcp | find "443" >nul 2>nul && echo 443端口已开启 || echo 443未开启
另一个程序正在使用此文件,进程无法访问。 (异常来自 HRESULT:0x80070020)
[SVN] VisualSVN Server Manager 443端口
netstat -aon|findstr "443"
得到占用443端口的进程ID,发现是VisualSVNServer.exe占用了它。
修改VisualSVN Server Manager的端口方法如下:
(1)打开VisualSVN Server Manager
(2)点击根节点“VisualSVN Server Manager (Local)”
(3)右键-Properties
(4)Network选项卡,Server Port选为8443
证书系统创建的CSR,包含:证书私钥文件214405557430106.key、PFX格式证书文件214405557430106.pfx、PFX格式证书密码文件pfx-password.txt
IIS7/IIS7.5 URL 重写 HTTP 重定向到 HTTPS
进入“URL重写”模块,点击“添加规则”
选择“空白规则”
名称:HTTP to HTTPS redirect 模式:(.*)
条件输入:{HTTPS} 模式:off 或 ^OFF$
或
重定向URL:https://{HTTP_HOST}/{R:1} 重定向类型:已找到(302) 或 参阅其它(303)
或
配置完成后“应用”到当前站点
#682
URL对象是硬盘(SD卡等)指向文件的一个路径,如果我们做文件上传的时候,想在没有上传服务器端的情况下看到上传图片的效果图的时候就可是以通过
var url=window.URL.createObjectURL(obj.files[0]);[/url]获得一个http格式的url路径,这个时候就可以设置到<img>中显示了。 window.webkitURL和window.URL是一样的,window.URL标准定义,window.webkitURL是webkit内核的实现(一般手机上就是使用这个),还有火狐等浏览器的实现。 #,广西南宁市,2017-12-29,14:08:38, 多张图片上传jQuery插件
#683
1李老板热心赚快钱,总想利用流量来带自己的产品,手里有个锤子看什么问题都是钉子,目光不够长远。
2团队管理肯定出了大问题,我是见识过一个固化的团队有多可怕,任何方案都有本事做跑样。
#684