![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PHP
shanbangyou
这个作者很懒,什么都没留下…
展开
-
PHP - 利用P3P实现跨域
; ?>http://www.b.com/b_setcookie.php 文件内容:<script src="http://www.a.com/a_setcookie.php?id=www.b.com"></script>通过浏览器访问:1?> http://www.b.com/b_setcookie.php2?> http://www.a.com/a_getcookie.php访问1 b.原创 2012-09-06 22:20:11 · 48 阅读 · 0 评论 -
php超级字符串用法
原创 2012-10-16 12:26:19 · 100 阅读 · 0 评论 -
PHP magic_quotes_gpc的详细使用方法,addslashes()和stripslashes()用法
原创 2012-10-21 12:14:50 · 141 阅读 · 0 评论 -
discuz的加密算法
** @return string 原字串经过私有密匙加密后的结果*/function passport_encrypt($txt, $key) { // 使用随机数发生器产生 0~32000 的值并 MD5() srand((double)microtime() * 1000000); $encrypt_key = md5(rand(0, 32000)); // 变量初始化 $ctr = 0; $tmp = ''; //2012-11-26 14:22:21 · 210 阅读 · 0 评论 -
CURL学习
原创 2012-12-24 11:08:52 · 80 阅读 · 0 评论 -
PHP安装Xdebug调试工具
原创 2013-02-26 14:27:47 · 246 阅读 · 0 评论 -
php如何转换html标签
mp;lt;',把空格' '转换成'&nbsp;'等。php已经有了这样的函数,那就是:html_entity_decode.php 代码:<?php $new = htmlspecialchars("<a href='http://chenhaibo0806999.iteye.com/admin/blogs/new>Test</a>"); echo $new; // &am原创 2013-03-06 18:28:19 · 155 阅读 · 0 评论 -
网页前端常用的小函数汇总,分页啦,中文截取啦,文件写入啦,啥的
ublic static $client_ip = null; public static $cfc_handle = null; /** * 获得用户的真实IP 地址 * * @param 多个用多行分开 * @return void */ public static function get_client_ip() { static $realip = NULL;原创 2013-03-25 15:57:12 · 91 阅读 · 0 评论 -
PHP源代码加密
uvwxyz"; return str_shuffle($str); } $filename='index.php'; $T_k1=RandAbc();//随机密匙1 $T_k2=RandAbc();//随机密匙2 $vstr=file_get_contents($filename);//要加密的文件 $v1=base64_encode($vstr); $c=strtr($v1,$T原创 2013-04-05 21:57:22 · 195 阅读 · 0 评论 -
Linux下PHP中添加Memcache扩展支持
原创 2013-04-06 21:31:51 · 79 阅读 · 0 评论 -
前端调用数据库内容是html实体时使用
原创 2013-04-28 23:12:11 · 262 阅读 · 0 评论 -
php.ini常见设置
原创 2013-06-08 11:21:09 · 79 阅读 · 0 评论 -
DEDECMS网站安全:教您更改data目录名称
示:强烈建议将data目录搬移到Web根目录以外,查看如何搬迁。 但是对于虚拟主机来说,有些虚拟主机限制,不给移动到web目录以外,那么为了最大限度的减少网站被攻击的可能,我们可以将data目录改名,这样也进一步减少了攻击的可能。具体操作如下:1、修改include目录下的common.inc.php这个文件。打开文件,找到第16行:define('DEDEDATA', DEDEROOT.'/data'); 把data修改成为您要改的目录名,如:改为asdfg,那么则改为:defin原创 2013-08-29 15:50:51 · 87 阅读 · 0 评论 -
二维数组按,某个值排序
, ), 'key2' => array( 'item1' => '24', ), 'key3' => array( 'item1' => '38', 'item3' => '45', ), ); //要排序的键 //按照数组中的 item1进行排序 //你也可以换成item2 $sort = 'item1'; foreach($array as $k => $v)原创 2014-03-03 16:43:40 · 123 阅读 · 0 评论 -
ThinkPHP组件widget扩展使用
dget{ //$data = array('cid' => 1);组件中传入的参数 public function render($data) { $data['content'] = 'Hello everyone!'; $tplFile = THEME_PATH .'Widget_sayHello.html'; $content = $this->renderFile($tplFile,原创 2012-07-19 16:17:56 · 75 阅读 · 0 评论 -
php soap的简单用法
{ return 'hello world!'; }}?> 第二步:将类文件生成 wsdl文件server.wsdl。 由于wsdl文件编写比较复杂,所以我们用第三方工具生成。我们以zend studio为例子演示: Tools ==> WSDL Generator ==> Configration name : test; WSDL file name原创 2012-06-24 22:26:23 · 51 阅读 · 0 评论 -
Cannot start session without errors, please check errors 错误解决办法
2010-09-09 15:38:31 · 80 阅读 · 0 评论 -
在 PHP 中养成 7 个面向对象的好习惯
原创 2012-04-19 23:05:23 · 48 阅读 · 0 评论 -
try(........){throw new Exception("xxxxxx")}........catch(){.........}用法
ew Exception('key值不一致'); } echo 'oo'; */ echo 1/0; echo "throw"; //throw new Exception ( "Method not exists!" ); } catch(Exception $e) { print_r($e); echo "xxx"; }}原创 2012-06-12 10:39:25 · 684 阅读 · 0 评论 -
PHP页面编码问题
原创 2014-05-17 11:38:05 · 121 阅读 · 0 评论