新浪编辑器使用方法

 更新时间:2016年9月20日 19:00  点击:1861

 

header('content-type:text/html;charset=utf-8;');
include_once('sinaeditor.class.php教程');
/*********************************************************************************/
//这里判断表单提交动作,然后赋值给$content;
if($_get['act']=='subok') die(htmlspecialchars($content=$_post['gently_editor']));
/*********************************************************************************/
$editor=new sinaeditor('gently_editor');
$editor->value='<img src="../logo.gif"><h2>新浪博客编辑器php图片上传版!</h2>';
$editor->basepath='.';
$editor->height=500;
$editor->width=650;
$editor->autosave=false;
?>
<div align="center">
<form name="form1" id="form1" method="post" action="index.php?act=subok">
<?php
 $editor->create();
?><br />
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</div>

<?
class sinaeditor{
 var $basepath;
 var $width;
 var $height;
 var $ename;
 var $value;
 var $autosave;
 function sinaeditor($ename){
  $this->ename=$ename;
  $this->basepath='.';
  $this->autosave=false;
  $this->height=460;
  $this->width=630;
 }
 function __construct($ename){
  $this->sinaeditor($ename);
 }
 function create(){
  $readcookie=$this->autosave?1:0;
  print <<<eot
  <textarea name="{$this->ename}" id="{$this->ename}" style="display:none;">{$this->value}</textarea>
  <iframe src="{$this->basepath}/edit/editor.htm?id={$this->ename}&readcookie={$readcookie}" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="{$this->width}" height="{$this->height}"></iframe>
eot;
 }
}
?>

编辑器下载地址
http://down.111cn.net/webedit/2010/0819/20307.html

110.16.0.0/14
110.52.0.0/15
110.6.0.0/15
110.72.0.0/15
112.109.128.0/17
112.111.0.0/16
112.122.0.0/15
112.132.0.0/16
112.192.0.0/14
112.224.0.0/11
112.64.0.0/15
112.80.0.0/13
112.88.0.0/13
112.96.0.0/15
113.0.0.0/13
113.194.0.0/15
113.200.0.0/15
113.204.0.0/14
113.224.0.0/12
113.56.0.0/15
113.58.0.0/16
113.59.0.0/17
113.8.0.0/15
114.240.0.0/12
115.46.0.0/16
115.48.0.0/12
115.85.192.0/18
116.112.0.0/14
116.116.0.0/15
116.2.0.0/15
116.95.0.0/16
117.8.0.0/13
118.212.0.0/16
118.72.0.0/13
118.80.0.0/15
119.108.0.0/15
119.112.0.0/13
119.162.0.0/15
119.164.0.0/14
119.176.0.0/12
119.248.0.0/14
119.36.0.0/16
119.39.0.0/16
119.4.0.0/14
119.48.0.0/13
119.62.0.0/16
120.0.0.0/12
120.80.0.0/13
121.16.0.0/13
121.24.0.0/14
121.28.0.0/15
121.30.0.0/16
121.31.0.0/16
122.136.0.0/13
122.156.0.0/14
122.192.0.0/14
122.96.0.0/15
123.112.0.0/12
123.128.0.0/13
123.138.0.0/15
123.144.0.0/14
123.148.0.0/16
123.152.0.0/13
123.188.0.0/14
123.232.0.0/14
123.4.0.0/14
123.8.0.0/13
124.128.0.0/13
124.160.0.0/16
124.161.0.0/16
124.162.0.0/16
124.163.0.0/16
124.164.0.0/14
124.64.0.0/15
124.66.0.0/17
124.67.0.0/16
124.88.0.0/16
124.89.0.0/17
124.89.128.0/17
124.90.0.0/15
124.92.0.0/14
125.211.0.0/16
125.32.0.0/16
125.33.0.0/16
125.34.0.0/16
125.35.0.0/17
125.35.128.0/17
125.36.0.0/14
125.40.0.0/13
175.42.0.0/15
202.102.128.0/21
202.102.136.0/21
202.102.144.0/20
202.102.224.0/21
202.102.232.0/21
202.102.240.0/20
202.106.0.0/16
202.107.0.0/17
202.108.0.0/16
202.110.0.0/18
202.110.192.0/18
202.110.64.0/18
202.111.128.0/19
202.130.224.0/19
202.38.143.0/24
202.96.0.0/18
202.96.64.0/21
202.96.72.0/21
202.96.80.0/20
202.97.128.0/18
202.97.192.0/19
202.97.224.0/21
202.97.232.0/21
202.97.240.0/20
202.98.0.0/21
202.98.8.0/21
202.99.0.0/18
202.99.104.0/21
202.99.112.0/20
202.99.128.0/19
202.99.160.0/21
202.99.168.0/21
202.99.176.0/20
202.99.192.0/21
202.99.200.0/21
202.99.208.0/20
202.99.224.0/21
202.99.232.0/21
202.99.240.0/20
202.99.64.0/19
202.99.96.0/21
203.93.192.0/18
203.93.64.0/18
203.93.8.0/24
210.13.0.0/18
210.13.128.0/17
210.13.64.0/18
210.14.160.0/19
210.14.192.0/19
210.15.128.0/18
210.15.32.0/19
210.15.96.0/19
210.21.0.0/17
210.51.0.0/16
210.52.128.0/17
210.53.0.0/17
210.53.128.0/17
210.74.128.0/19
210.74.96.0/19
210.78.0.0/19
210.78.160.0/19
210.78.192.0/18
210.82.0.0/15
211.144.0.0/15
211.90.0.0/15
211.92.0.0/15
211.94.0.0/15
211.96.0.0/15
218.10.0.0/16
218.104.0.0/17
218.104.128.0/19
218.104.160.0/19
218.104.192.0/21
218.104.200.0/21
218.104.208.0/20
218.104.224.0/19
218.105.0.0/16
218.106.0.0/15
218.11.0.0/16
218.12.0.0/16
218.21.128.0/17
218.24.0.0/15
218.26.0.0/16
218.27.0.0/16
218.28.0.0/15
218.56.0.0/14
218.60.0.0/15
218.67.128.0/17
218.68.0.0/15
218.7.0.0/16
218.8.0.0/15
219.154.0.0/15
219.156.0.0/15
219.158.0.0/17
219.158.128.0/17
219.159.0.0/18
220.192.0.0/15
220.194.0.0/15
220.196.0.0/14
220.200.0.0/13
220.248.0.0/14
220.252.0.0/16
221.0.0.0/15
221.10.0.0/16
221.11.0.0/17
221.11.128.0/18
221.11.192.0/19
221.11.224.0/19
221.12.0.0/17
221.12.128.0/18
221.13.0.0/18
221.13.128.0/17
221.13.64.0/19
221.13.96.0/19
221.14.0.0/15
221.192.0.0/15
221.194.0.0/16
221.195.0.0/16
221.196.0.0/15
221.198.0.0/16
221.199.0.0/19
221.199.128.0/18
221.199.192.0/20
221.199.224.0/19
221.199.32.0/20
221.199.48.0/20
221.199.64.0/18
221.2.0.0/16
221.200.0.0/14
221.204.0.0/15
221.206.0.0/16
221.207.0.0/18
221.207.128.0/17
221.207.64.0/18
221.208.0.0/14
221.212.0.0/16
221.213.0.0/16
221.214.0.0/15
221.216.0.0/13
221.3.0.0/17
221.3.128.0/17
221.4.0.0/16
221.5.0.0/17
221.5.128.0/17
221.6.0.0/16
221.7.0.0/19
221.7.128.0/17
221.7.32.0/19
221.7.64.0/19
221.7.96.0/19
221.8.0.0/15
222.128.0.0/14
222.132.0.0/14
222.136.0.0/13
222.160.0.0/15
222.162.0.0/16
222.163.0.0/19
222.163.128.0/17
222.163.32.0/19
222.163.64.0/18
58.144.0.0/16
58.16.0.0/16
58.17.0.0/17
58.17.128.0/17
58.18.0.0/16
58.19.0.0/16
58.20.0.0/16
58.21.0.0/16
58.22.0.0/15
58.240.0.0/15
58.242.0.0/15
58.244.0.0/15
58.246.0.0/15
58.248.0.0/13
60.0.0.0/13
60.10.0.0/16
60.11.0.0/16
60.12.0.0/16
60.13.0.0/18
60.13.128.0/17
60.13.64.0/18
60.14.0.0/15
60.16.0.0/13
60.208.0.0/13
60.216.0.0/15
60.218.0.0/15
60.220.0.0/14
60.24.0.0/14
60.28.0.0/15
60.30.0.0/16
60.31.0.0/16
60.8.0.0/15
61.133.0.0/17
61.134.128.0/18
61.134.192.0/18
61.134.96.0/19
61.135.0.0/16
61.136.0.0/18
61.136.64.0/18
61.137.128.0/17
61.138.0.0/18
61.138.128.0/18
61.138.64.0/18
61.139.128.0/18
61.148.0.0/15
61.156.0.0/16
61.158.0.0/17
61.158.128.0/17
61.159.0.0/18
61.161.0.0/18
61.161.128.0/17
61.162.0.0/16
61.163.0.0/16
61.167.0.0/16
61.168.0.0/16
61.176.0.0/16
61.179.0.0/16
61.180.128.0/17
61.181.0.0/16
61.182.0.0/16
61.189.0.0/17
61.240.0.0/14
61.48.0.0/14
61.52.0.0/15
61.54.0.0/16
61.55.0.0/16
110.152.0.0/14
110.156.0.0/15
110.166.0.0/15
110.176.0.0/13
110.80.0.0/13
110.88.0.0/14
111.120.0.0/14
111.124.0.0/16
112.100.0.0/14
112.112.0.0/14
112.116.0.0/15
112.66.0.0/15
112.98.0.0/15
113.112.0.0/13
113.12.0.0/14
113.120.0.0/13
113.128.0.0/15
113.132.0.0/14
113.136.0.0/13
113.16.0.0/15
113.218.0.0/15
113.220.0.0/14
113.24.0.0/14
113.240.0.0/13
113.248.0.0/14
113.62.0.0/15
113.64.0.0/11
113.96.0.0/12
114.104.0.0/14
114.135.0.0/16
114.138.0.0/15
114.216.0.0/13
114.224.0.0/12
114.80.0.0/12
114.96.0.0/13
115.148.0.0/14
115.152.0.0/15
115.168.0.0/14
115.192.0.0/11
115.224.0.0/12
116.1.0.0/16
116.16.0.0/12
116.192.0.0/16
116.207.0.0/16
116.208.0.0/14
116.224.0.0/12
116.246.0.0/15
116.248.0.0/15
116.252.0.0/15
116.4.0.0/14
116.52.0.0/14
116.8.0.0/14
117.21.0.0/16
117.22.0.0/15
117.24.0.0/13
117.32.0.0/13
117.40.0.0/14
117.44.0.0/15
117.57.0.0/16
117.60.0.0/14
117.64.0.0/13
117.80.0.0/12
118.112.0.0/13
118.120.0.0/14
118.124.0.0/15
118.180.0.0/14
118.213.0.0/16
118.239.0.0/16
118.248.0.0/13
118.84.0.0/15
119.0.0.0/15
119.120.0.0/13
119.128.0.0/12
119.144.0.0/14
119.41.0.0/16
119.60.0.0/16
119.84.0.0/14
119.96.0.0/13
120.32.0.0/13
120.40.0.0/14
120.68.0.0/14
120.88.8.0/21
121.204.0.0/14
121.224.0.0/12
121.32.0.0/14
121.56.0.0/15
121.58.0.0/17
121.59.0.0/16
121.60.0.0/14
121.8.0.0/13
122.102.80.0/20
122.224.0.0/12
122.240.0.0/13
122.4.0.0/14
123.103.0.0/17
123.149.0.0/16
123.150.0.0/15
123.160.0.0/14
123.164.0.0/14
123.168.0.0/14
123.172.0.0/15
123.174.0.0/15
123.177.0.0/16
123.178.0.0/15
123.180.0.0/14
123.184.0.0/14
123.244.0.0/14
123.96.0.0/15
124.112.0.0/15
124.114.0.0/15
124.116.0.0/16
124.117.0.0/16
124.118.0.0/15
124.224.0.0/16
124.225.0.0/16
124.226.0.0/15
124.228.0.0/14
124.232.0.0/15
124.234.0.0/15
124.236.0.0/14
124.31.0.0/16
124.72.0.0/16
124.73.0.0/16
124.74.0.0/15
124.76.0.0/14
125.104.0.0/13
125.112.0.0/12
125.64.0.0/13
125.72.0.0/16
125.73.0.0/16
125.74.0.0/15
125.76.0.0/17
125.76.128.0/17
125.77.0.0/16
125.78.0.0/15
125.80.0.0/13
125.88.0.0/13
180.212.0.0/15
202.100.0.0/21
202.100.104.0/21
202.100.112.0/20
202.100.128.0/21
202.100.136.0/21
202.100.144.0/20
202.100.16.0/20
202.100.160.0/21
202.100.168.0/21
202.100.176.0/20
202.100.192.0/21
202.100.200.0/21
202.100.208.0/20
202.100.224.0/19
202.100.32.0/19
202.100.64.0/21
202.100.72.0/21
202.100.80.0/20
202.100.96.0/21
202.101.0.0/18
202.101.128.0/18
202.101.224.0/21
202.101.64.0/19
202.101.96.0/19
202.102.0.0/19
202.102.192.0/21
202.102.200.0/21
202.102.208.0/20
202.102.32.0/19
202.102.64.0/18
202.103.0.0/21
202.103.104.0/21
202.103.112.0/20
202.103.128.0/18
202.103.16.0/20
202.103.192.0/19
202.103.224.0/21
202.103.232.0/21
202.103.240.0/20
202.103.32.0/19
202.103.64.0/19
202.103.8.0/21
202.103.96.0/21
202.104.0.0/15
202.107.128.0/17
202.109.0.0/16
202.110.128.0/18
202.111.0.0/17
202.111.160.0/19
202.111.192.0/18
202.96.104.0/21
202.96.112.0/20
202.96.128.0/21
202.96.136.0/21
202.96.144.0/20
202.96.160.0/21
202.96.168.0/21
202.96.176.0/20
202.96.192.0/21
202.96.200.0/21
202.96.208.0/20
202.96.224.0/21
202.96.232.0/21
202.96.240.0/20
202.96.96.0/21
202.97.0.0/21
202.97.112.0/20
202.97.16.0/20
202.97.32.0/19
202.97.64.0/19
202.97.8.0/21
202.97.96.0/20
202.98.104.0/21
202.98.112.0/20
202.98.128.0/19
202.98.16.0/20
202.98.160.0/21
202.98.168.0/21
202.98.176.0/20
202.98.192.0/21
202.98.200.0/21
202.98.208.0/20
202.98.224.0/21
202.98.232.0/21
202.98.240.0/20
202.98.32.0/21
202.98.40.0/21
202.98.48.0/20
202.98.64.0/19
202.98.96.0/21
202.99.192.0/21
203.130.32.0/19
203.212.0.0/20
210.192.96.0/19
218.0.0.0/16
218.1.0.0/16
218.13.0.0/16
218.14.0.0/15
218.16.0.0/14
218.2.0.0/15
218.20.0.0/16
218.21.0.0/17
218.22.0.0/15
218.30.0.0/15
218.4.0.0/15
218.6.0.0/16
218.62.0.0/17
218.62.128.0/17
218.63.0.0/16
218.64.0.0/15
218.66.0.0/16
218.67.0.0/17
218.70.0.0/15
218.72.0.0/14
218.76.0.0/15
218.78.0.0/15
218.80.0.0/14
218.84.0.0/14
218.88.0.0/13
219.128.0.0/12
219.144.0.0/14
219.148.0.0/16
219.149.0.0/17
219.149.128.0/18
219.149.192.0/18
219.150.0.0/19
219.150.112.0/20
219.150.128.0/17
219.150.32.0/19
219.150.64.0/19
219.150.96.0/20
219.151.0.0/19
219.151.128.0/17
219.151.32.0/19
219.151.64.0/18
219.152.0.0/15
219.159.128.0/17
219.159.64.0/18
220.160.0.0/11
221.224.0.0/13
221.232.0.0/14
221.236.0.0/15
221.238.0.0/16
221.239.0.0/17
221.239.128.0/17
222.168.0.0/15
222.170.0.0/15
222.172.0.0/17
222.172.128.0/17
222.173.0.0/16
222.174.0.0/15
222.176.0.0/13
222.184.0.0/13
222.208.0.0/13
222.216.0.0/15
222.218.0.0/16
222.219.0.0/16
222.220.0.0/15
222.222.0.0/15
222.240.0.0/13
222.64.0.0/13
222.72.0.0/15
222.74.0.0/16
222.75.0.0/16
222.76.0.0/14
222.80.0.0/15
222.82.0.0/16
222.83.0.0/17
222.83.128.0/17
222.84.0.0/16
222.85.0.0/17
222.85.128.0/17
222.86.0.0/15
222.88.0.0/15
222.90.0.0/15
222.92.0.0/14
58.208.0.0/12
58.32.0.0/13
58.40.0.0/15
58.42.0.0/16
58.43.0.0/16
58.44.0.0/14
58.48.0.0/13
58.56.0.0/15
58.58.0.0/16
58.59.0.0/17
58.59.128.0/17
58.60.0.0/14
59.172.0.0/15
59.174.0.0/15
59.32.0.0/13
59.40.0.0/15
59.42.0.0/16
59.43.0.0/16
59.44.0.0/14
59.48.0.0/16
59.49.0.0/17
59.49.128.0/17
59.50.0.0/16
59.51.0.0/17
59.51.128.0/17
59.52.0.0/14
59.56.0.0/14
59.60.0.0/15
59.62.0.0/15
60.160.0.0/15
60.162.0.0/15
60.164.0.0/15
60.166.0.0/15
60.168.0.0/13
60.176.0.0/12
60.235.0.0/16
61.128.0.0/15
61.130.0.0/15
61.132.0.0/16
61.133.128.0/17
61.134.0.0/18
61.134.64.0/19
61.136.128.0/17
61.137.0.0/17
61.138.192.0/18
61.139.0.0/17
61.139.192.0/18
61.140.0.0/14
61.144.0.0/14
61.150.0.0/15
61.152.0.0/16
61.153.0.0/16
61.154.0.0/15
61.157.0.0/16
61.159.128.0/17
61.159.64.0/18
61.160.0.0/16
61.161.64.0/18
61.164.0.0/16
61.165.0.0/16
61.166.0.0/16
61.169.0.0/16
61.170.0.0/15
61.172.0.0/14
61.177.0.0/16
61.178.0.0/16
61.180.0.0/17
61.183.0.0/16
61.184.0.0/14
61.188.0.0/16
61.189.128.0/17
61.190.0.0/15
110.192.0.0/11
110.96.0.0/11
122.64.0.0/11
123.64.0.0/11
203.90.160.0/19
211.98.0.0/15
221.172.0.0/14
222.32.0.0/11
61.232.0.0/14
61.236.0.0/15
112.0.0.0/10
117.128.0.0/10
120.192.0.0/10
121.36.0.0/16
202.0.176.0/22
211.103.0.0/17
211.136.0.0/14
211.140.0.0/15
211.142.0.0/17
211.142.128.0/17
211.143.0.0/16
218.200.0.0/14
218.204.0.0/15
218.206.0.0/15
221.130.0.0/15
221.176.0.0/13

进行了301重定向,把www.111cn.net和111cn.net合并,并把之前的域名也一并合并. 有两种实现方法,第一种方法是判断nginx核心变量host(老版本是http_host):
server {
server_name www.111cn.net 111cn.net ;
if ($host != 'www.111cn.net' ) {
rewrite ^/(.*)$ http://www.111cn.net/$1 permanent;
}
...
}
第二种方法:
server {
server_name 111cn.net;
rewrite ^/(.*) http://www.111cn.net/$1 permanent;
}

测试了第一种方法ok,这两种方法中, permanent是关键,详细说明见nginx重定向规则说明。

last – 基本上都用这个flag。
break – 中止rewirte,不在继续匹配
redirect – 返回临时重定向的http状态302
permanent – 返回永久重定向的http状态301

好了,现在可以检查结果,这里可以看返回的http头信息:

http://www.seo教程consultants.com/tools/headers.asp教程

第二种方法没有测试成功...


--------------------------------------------------------------------------------
测试是否定向成功

http://qinfy.net/301-redirect-for-nginx/

输入指令~

/usr/local/nginx/sbin/nginx -t
提示:
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful

测试成功~ 重启nginx~ 输入指令~

/usr/local/nginx/sbin/nginx -s reload
重启之后测试一下~是否成功设定完成! 输入指令~

curl -i imcat.tk


会输出:

http/1.1 301 moved permanently
server: nginx/0.7.65
date: tue, 03 aug 2010 01:12:37 gmt
content-type: text/html
content-length: 185
connection: keep-alive
location: http://111cn.net/

本文章提供一款jquery javascript获取图片的宽高代码哦,第一款是基于jquery的例子,第二款是利用js获取上传图片的高度与宽度代码。

jquery例子

var img = $(‘#imageid');

var theimage = new image();t

heimage.src = img.attr(“src”);

alert(“width: ” + theimage.width);

alert(“height: ” + theimage.height);


js例子

var img = new image();
img.onload = function(){
 宽度=this.width
 高度=this.height
}
img.src = 图片地址;

现在浏览器多啊,如有 chrome/ff/ie,那我们设计师就会碰到很多问题,如果不兼容问题,今天我们要讲的是关于iframe的 frameborder在不同浏览器不兼容解决方法。

代码如下:

var iframe = document.createelement("iframe");
iframe.id = "frame-" + index;
iframe.src = url;
iframe.width = "100%";
iframe.marginwidth = "0";
iframe.scrolling = "no";
iframe.frameborder="0";

使用ie中“查看选定区域源代码”发现创建的iframe代码是<iframe frameborder=0/>,网上搜了下资料,原来是ie不认小写,我晕死....

使用
 代码如下:

setattribute("frameborder", "0", 0);


//问题解决了。


 代码如下:

var iframe = document.createelement("iframe");
iframe.id = "frame-" + index;
iframe.src = url;
iframe.width = "100%";
iframe.marginwidth = "0";
iframe.scrolling = "no";
iframe.setattribute("frameborder", "0", 0); //最后一个0表示是否区别大小写,问题解决
[!--infotagslink--]

相关文章

  • php 中file_get_contents超时问题的解决方法

    file_get_contents超时我知道最多的原因就是你机器访问远程机器过慢,导致php脚本超时了,但也有其它很多原因,下面我来总结file_get_contents超时问题的解决方法总结。...2016-11-25
  • 图解PHP使用Zend Guard 6.0加密方法教程

    有时为了网站安全和版权问题,会对自己写的php源码进行加密,在php加密技术上最常用的是zend公司的zend guard 加密软件,现在我们来图文讲解一下。 下面就简单说说如何...2016-11-25
  • HTTP 408错误是什么 HTTP 408错误解决方法

    相信很多站长都遇到过这样一个问题,访问页面时出现408错误,下面一聚教程网将为大家介绍408错误出现的原因以及408错误的解决办法。 HTTP 408错误出现原因: HTT...2017-01-22
  • Android子控件超出父控件的范围显示出来方法

    下面我们来看一篇关于Android子控件超出父控件的范围显示出来方法,希望这篇文章能够帮助到各位朋友,有碰到此问题的朋友可以进来看看哦。 <RelativeLayout xmlns:an...2016-10-02
  • php抓取网站图片并保存的实现方法

    php如何实现抓取网页图片,相较于手动的粘贴复制,使用小程序要方便快捷多了,喜欢编程的人总会喜欢制作一些简单有用的小软件,最近就参考了网上一个php抓取图片代码,封装了一个php远程抓取图片的类,测试了一下,效果还不错分享...2015-10-30
  • ps怎么使用HSL面板

    ps软件是现在很多人都会使用到的,HSL面板在ps软件中又有着非常独特的作用。这次文章就给大家介绍下ps怎么使用HSL面板,还不知道使用方法的下面一起来看看。 &#8195;...2017-07-06
  • ps把文字背景变透明的操作方法

    ps软件是现在非常受大家喜欢的一款软件,有着非常不错的使用功能。这次文章就给大家介绍下ps把文字背景变透明的操作方法,喜欢的一起来看看。 1、使用Photoshop软件...2017-07-06
  • intellij idea快速查看当前类中的所有方法(推荐)

    这篇文章主要介绍了intellij idea快速查看当前类中的所有方法,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下...2020-09-02
  • Mysql select语句设置默认值的方法

    1.在没有设置默认值的情况下: 复制代码 代码如下:SELECT userinfo.id, user_name, role, adm_regionid, region_name , create_timeFROM userinfoLEFT JOIN region ON userinfo.adm_regionid = region.id 结果:...2014-05-31
  • js导出table数据到excel即导出为EXCEL文档的方法

    复制代码 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta ht...2013-10-13
  • Plesk控制面板新手使用手册总结

    许多的朋友对于Plesk控制面板应用不是非常的了解特别是英文版的Plesk控制面板,在这里小编整理了一些关于Plesk控制面板常用的使用方案整理,具体如下。 本文基于Linu...2016-10-10
  • mysql 批量更新与批量更新多条记录的不同值实现方法

    批量更新mysql更新语句很简单,更新一条数据的某个字段,一般这样写:复制代码 代码如下:UPDATE mytable SET myfield = 'value' WHERE other_field = 'other_value';如果更新同一字段为同一个值,mysql也很简单,修改下where即...2013-10-04
  • js基础知识(公有方法、私有方法、特权方法)

    本文涉及的主题虽然很基础,在许多人看来属于小伎俩,但在JavaScript基础知识中属于一个综合性的话题。这里会涉及到对象属性的封装、原型、构造函数、闭包以及立即执行表达式等知识。公有方法 公有方法就是能被外部访问...2015-11-08
  • ps怎么制作倒影 ps设计倒影的方法

    ps软件是一款非常不错的图片处理软件,有着非常不错的使用效果。这次文章要给大家介绍的是ps怎么制作倒影,一起来看看设计倒影的方法。 用ps怎么做倒影最终效果&#819...2017-07-06
  • 使用insertAfter()方法在现有元素后添加一个新元素

    复制代码 代码如下: //在现有元素后添加一个新元素 function insertAfter(newElement, targetElement){ var parent = targetElement.parentNode; if (parent.lastChild == targetElement){ parent.appendChild(newEl...2014-05-31
  • c#中分割字符串的几种方法

    单个字符分割 string s="abcdeabcdeabcde"; string[] sArray=s.Split('c'); foreach(string i in sArray) Console.WriteLine(i.ToString()); 输出下面的结果: ab de...2020-06-25
  • PHP 验证码不显示只有一个小红叉的解决方法

    最近想自学PHP ,做了个验证码,但不知道怎么搞的,总出现一个如下图的小红叉,但验证码就是显示不出来,原因如下 未修改之前,出现如下错误; (1)修改步骤如下,原因如下,原因是apache权限没开, (2)点击打开php.int., 搜索extension=ph...2013-10-04
  • 安卓手机wifi打不开修复教程,安卓手机wifi打不开解决方法

    手机wifi打不开?让小编来告诉你如何解决。还不知道的朋友快来看看。 手机wifi是现在生活中最常用的手机功能,但是遇到手机wifi打不开的情况该怎么办呢?如果手机wifi...2016-12-21
  • 使用GruntJS构建Web程序之构建篇

    大概有如下步骤 新建项目Bejs 新建文件package.json 新建文件Gruntfile.js 命令行执行grunt任务 一、新建项目Bejs源码放在src下,该目录有两个js文件,selector.js和ajax.js。编译后代码放在dest,这个grunt会...2014-06-07
  • 使用percona-toolkit操作MySQL的实用命令小结

    1.pt-archiver 功能介绍: 将mysql数据库中表的记录归档到另外一个表或者文件 用法介绍: pt-archiver [OPTION...] --source DSN --where WHERE 这个工具只是归档旧的数据,不会对线上数据的OLTP查询造成太大影响,你可以将...2015-11-24