可变变量:就是说一个可变变量获取了一个普通变量的值作为这个可变变量的变量名。例如:<?phpheader("content-type:text/html;charset=utf-8");$uername=‘村里有个姑娘‘;$name=‘xiaofang‘;$xiaofang=‘大阪城的姑娘‘;//$$name=$xiaofangecho$$name;//可变变量的用法$banzhure..
分类:
Web程序 时间:
2014-09-23 11:35:54
阅读次数:
172
PHP 页面编码声明方法详解(header或meta)PHP 页面编码声明与用header或meta实现PHP页面编码的区别php的header来定义一个php页面为utf编码或GBK编码 php页面为utf编码 header("Content-type: text/html; charset=ut...
分类:
Web程序 时间:
2014-09-22 11:03:02
阅读次数:
407
function substr_text($str, $start=0, $length, $charset="utf-8", $suffix=""){ if(function_exists("mb_substr")){//mb_substr函数不是php内置函数,需要加载php.mbstring....
分类:
其他好文 时间:
2014-09-21 20:52:31
阅读次数:
217
首先,明确一下字符集和校对规则的概念: 字符集(charset):是一套符号和编码 校对规则(collation):是在字符集内用于比较字符的一套规则,比如有的规则区分大小写,有的则无视 mysql服务器能够支持多种字符集,可以使用SHOW CHARACTER SET语句列出可用的字...
分类:
数据库 时间:
2014-09-21 18:36:40
阅读次数:
263
1、pageEncoding="UTF-8"的作用是设置JSP编译成Servlet时使用的编码。2、contentType="text/html;charset=UTF-8"的作用是指定对服务器响应进行重新编码的编码。3、request.setCharacterEncoding("UTF-8")的作...
分类:
其他好文 时间:
2014-09-21 14:30:10
阅读次数:
173
一、登陆页面:
html>
head>
meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
title> Insert
title heretitle >
link rel= "stylesheet" type ="text/css" href="../../style/css....
分类:
Web程序 时间:
2014-09-19 21:10:16
阅读次数:
392
1.设置过滤器filter把所有的页面使用//将客户端的参数 进行编码转化request.setCharacterEncoding("utf-8");//解决JS乱码response.setContentType("text/html;charset=utf-8");此只适用于post请求。2.设置...
分类:
编程语言 时间:
2014-09-19 17:14:45
阅读次数:
193
<meta charset=‘utf-8‘ />
<title>观察者模式</title>
<?php
class Tongzhi implements SPLSubject
{
protected $subs = array();
public $username = ‘我是被观察者‘;
public ...
分类:
Web程序 时间:
2014-09-18 23:55:15
阅读次数:
398
我的index.jsp点我获取数据ID姓名地址我的servlet:response.setContentType("text/html;charset=utf-8");request.setCharacterEncoding("utf-8");List list = new ArrayList();...
分类:
Web程序 时间:
2014-09-18 20:17:04
阅读次数:
211
header('Content-type:text/html;charset=utf-8');function cutstr($str){ #计算$str的字符个数 preg_match_all("/./u", $str, $len); $strlen = (int) count(...
分类:
其他好文 时间:
2014-09-18 12:51:33
阅读次数:
177