随笔分类 - php
php开发
摘要:#unzip swoole-v4.8.13.zip#cd swoole-v4.8.13#/usr/local/php/bin/phpize#./configure --with-php-config=/usr/local/php/bin/php-config#make && make install
阅读全文
摘要:#wget https://xdebug.org/files/xdebug-3.2.2.tgz#tar -xvzf xdebug-3.2.2.tgz#cd xdebug-3.2.2 #/usr/local/php/bin/phpize#./configure -enable-xdebug --wit
阅读全文
摘要:1 由于我的是phpstudy集成环境,直接找到php.ini的位置: D:\phpstudy_pro\Extensions\php\php7.3.9nts\php.ini 在文件尾部直接添加 [Xdebug] zend_extension=D:/phpstudy_pro/Extensions/ph
阅读全文
摘要:function is_cli_mode() { $sapi_type = php_sapi_name(); if (isset($sapi_type) && substr($sapi_type, 0, 3) == 'cli') { return true; } else { return fals
阅读全文
摘要:<?php define("APPID", 'wxe127d5e246s9e343'); define("APP_SECRET", 'e35ba07f2e64we7uc5f0533cd1a63732'); header("Content-type: text/html; charset=utf-8"
阅读全文
摘要:<?php //测试redis 布隆过滤器 $redis = new Redis(); $redis->connect('127.0.0.1', 6379); // 创建一个容量是1千万,布隆过滤器: //$redis->rawCommand('BF.RESERVE', 'nzc:redisbloo
阅读全文
摘要:<?php namespace Demo; use Think\core; class Hello{ } echo '<pre>'; print_r(get_declared_classes()); /** array( [0]=> stdClass ... [143] => Redis [144]
阅读全文
摘要:<?php # 字符串转16进制 $string = "LockDataV"; $arr1 = str_split($string, 1); foreach ($arr1 as $akey => $aval) { $arr1[$akey] = "\x" . bin2hex($aval); } ech
阅读全文
摘要:function getobjallmethods($obj) { $class = new ReflectionClass($obj); foreach ($class->getMethods() as $key => $methodType) { if ($methodType->isPriva
阅读全文
摘要:<?php /** 这是一个swoole父进程和子进程之间通信的例子 */ //进程创建成功后回调处理 function handle(swoole_process $worker){ //从进程管道中读取数据 $data = $worker->read(); echo PHP_EOL."from
阅读全文
摘要:server.php <?php class Server { private $serv; private $logFilePath = "/data/wwwroot/houtai/Log/taskqueueu.log"; public function __construct() { $this
阅读全文
摘要:调用YII框架中jquery:Yii::app()->clientScript->registerCoreScript('jquery'); framework/web/js/source的js,其中registerCoreScriptkey调用的文件在framework/web/js/packag
阅读全文
摘要:执行SQL $connection=Yii::app()->db; // 假设你已经建立了一个 "db" 连接 $sql = "SELECT * FROM tbl_log WHERE logid<:logid"; $command=$connection->createCommand($sql);
阅读全文
摘要:安装过程可参考https://blog.csdn.net/example440982/article/details/86708165 laravel解决vendor缺失的问题: 直接在项目根目录下运行命令composer install 新建一个项目blog 根目录在blog/public/ ng
阅读全文
浙公网安备 33010602011771号