php程序效率优化的一些策略小结

yipeiwu_com6年前
1.在可以用file_get_contents替代file、fopen、feof、fgets等系列方法的情况下,尽量用 file_get_contents,因为他的效率高得多!但是要注意...

生成ubuntu自动切换壁纸xml文件的php代码

yipeiwu_com6年前
复制代码 代码如下: <?php /* * 生成ubuntu自动切换壁纸xml文件 */ //图片目录 $dir = '/home/yuxing/background'; $hd...

PHP无敌近乎加密方式!

yipeiwu_com6年前
因为本人对sql注入比较喜欢 前前后后 检测过不少网站 aspphpjsp 发现基本都是用md5加密算法 都说 MD5 不可逆 无法破 对 MD5是无法逆 可是可以暴力破 只需要把常用的...

PHP开发负载均衡指南

yipeiwu_com6年前
今天,'大型服务器'模式已经过去,取而代之的是大量的小服务器,使用各种各样的负载均衡技术。这是一种更可行的方法,将使硬件成本降至最低。 '更多小服务器'的优势超过过去的'大型服务器'模式...

按上下级层次关系输出内容的PHP代码

yipeiwu_com6年前
复制代码 代码如下:function getSubComments($parent = 0, $level = 0) { $db = &JFactory::getDBO(); $sql...

php下使用strpos需要注意 === 运算符

yipeiwu_com6年前
复制代码 代码如下:<?php /* 判断字符串是否存在的函数 */ function strexists($haystack, $needle) { return !(strpo...

php将会员数据导入到ucenter的代码

yipeiwu_com6年前
我们要用的会员表结构 复制代码 代码如下: create table if not exists `net_111cnnet` ( `id` int(11) not null auto_...

PHP连接SQLServer2005 的问题解决方法

yipeiwu_com6年前
后来火了,在虚拟机装上WIN2003一试,加载MSSQL模块是没问题了,但是用mssql_connect("localhost", "sa", "");却怎么也连不上数据库,后来上网查了...

UCenter中的一个可逆加密函数authcode函数代码

yipeiwu_com6年前
复制代码 代码如下: function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) { $ckey_...

php 模拟POST|GET操作实现代码

yipeiwu_com6年前
最近开发social game,发现使用这个东西还是比较平凡,这里做个总结,一来为自己留点记忆,另外希望对大家有帮助. 首先来看看需求,如果我们开发facebook上social gam...