class FTP{ public $off; // 返回操作状态(成功/失败) public $conn_id; // FTP连接 /** * 方法:FTP连接 * @FTP_HOST -- FTP主机 * @FTP_PORT -- 端口 * @FTP_USER -- 用户名 * @FTP_PASS -- 密码 */ const FTP_HOS ...
之前发过两版,这是第三版,更改为mysqli?php/*** 生成mysql数据字典*/header ( "Content-type: text/html; charset=utf-8" );// 配置数据库$dbserver = "127.0.0.1";$dbusername = "root";$dbpassword = "123";$dat ...
工具类:?phpclass DesEncrypt { private $key = ""; private $iv = ""; /** * 构造,传递二个已经进行base64_encode的KEY与IV * * @param string $key * @param string $iv */ function __construct ($key ...
实现目标:用户点击按钮,自动登录到某网站后台。前提:知道网站的用户名密码哈,不存在破解思路。疑难点:1.验证码的识别2.ajax提交的跨域问题验证码的识别技术上的实现这里不做讨论,本人是采用的融合接口来实现的 ...
1.下载phpredis3.1.2https://github.com/phpredis/phpredis/releases/tag/3.1.2 2.解压后在phpredis3.1.2目录下执行/usr/local/php56/bin/phpize 3.执行configure./configure --with-php-config=/usr/local/ph ...
?php/*** redis操作类* 说明,任何为false的串,存在redis中都是空串。* 只有在key不存在时,才会返回false。* 这点可用于防止缓存穿透**/class RedisOption{ private $redis; //当前数据库ID号 protected $dbId= ...
$mylist = array(array( 'parent_id'=0,'id'=1), array( 'parent_id'=0,'id'=2), array( 'parent_id'=0,'id'=3), array( 'parent_id'=2,'id'=4), array( 'parent_id'=2,'id'=5 ...
/** * 函数封装 * @param $user_info * @return mixed */function swoole_process($user_info){ $process = new swoole_process(function(swoole_process $worker)use($user_info){ $message = "您有一条新消息"; io ...
将之前公钥和私钥合成的pem文件复制到文件夹 - 创建一个PHP文件simplepush.php,其代码主要为:?phpset_time_limit(0);// 这里是我们上面得到的deviceToken,直接复制过来(记得去掉空格)$deviceToken = 'fa1157487 ...
问题:研究PHP的混淆加密,试了几个工具,最后还是决定采用Zend Guard,结果加密完成之后,在PHP环境跑的时候,报错:Zend Guard Run-time support missing! One more more files on this web site were encoded by Ze ...
客户端代码:htmlhead meta charset="UTF-8" titleWeb sockets test/title script src="jquery-min.js" type="text/javascript"/script script type="text/javascript" var ws; function ToggleConnection ...
我们先假设业务场景,是需要有这么一个扩展,提供一个叫ccvita_string的函数,他的主要作用是返回一段字符。(这个业务场景实在太假,大家就这么看看吧)对应的PHP代码可能是这样:function ccvita_string($str){ $ ...
php中可以通过bin2hex函数将字符串转换成16进制的形式输出,bin2hex()函数返回结果为ascii码?php$string = "Hello\tworld!\n";print($string."\n");print(bin2hex($string)."\n");?输出结果如下:Hello world!48656c ...
如这个例子:html meta charset="utf-8" body ?php $name="鸣人"; print "姓名的长度为:".strlen($name); ? /body /html 这个代码的输出结果是:姓名的长度为:6先探讨一下为什么会出现这个问题:PHP内置的字符串长 ...
首先1.确保你的Windows/system32下有php_mbstring.dll这个文件,没有就从你Php安装目录extensions里拷入Windows/system32里面。2.在windows目录下找到php.ini打开编辑,搜索mbstring.dll,找到;extension=php_mbstri ...