摘要:
function sendPost($url, $path) { $curl = curl_init(); if (class_exists('\CURLFile')) { //PHP版本 >= 5.5 curl_setopt($curl, CURLOPT_SAFE_UPLOAD, true); $ 阅读全文
摘要:
server.go package main import ( "github.com/gin-gonic/gin" "github.com/micro/go-micro/registry" "github.com/micro/go-micro/web" "github.com/micro/go-m 阅读全文
摘要:
/** * 父类P中 获取子类C的类名 */class P{ public static function getParent() { return self::class; } public static function getChild() { return static::class; } 阅读全文
摘要:
公式: a-a/b*b; <?php echo -5 % 3; //结果为-2; -5 - (-5)/3 * 3 => -5 - (-1) * 3 => -2; 阅读全文
摘要:
iNotifyjs下载链接:https://www.oschina.net/p/iNotifyjs 阅读全文
摘要:
/** * 删除缓存目录 * @param $dirname * @return bool */ function delCache($dirname) { $result = false; if (!is_dir($dirname)) { echo " $dirname is not... 阅读全文
摘要:
"; $data = ['a', 'b', 'c']; foreach($data as $key => $val){ $val = &$data[$key]; } echo "1."; var_dump($data); // 打印结果 // array(3) { [0]=> string(1) "b" [1]=> string(1) "c" [2]=> &string(1) "c" } /... 阅读全文
摘要:
$v){ $preg = preg_match("/^($old_prefix{1})([a-zA-Z0-9_-]+)/i", $v[0], $v1); if($preg){ $tab_name[$k] = $v1[2]; } } if($preg){ foreach($tab_name as $k => $v)... 阅读全文
摘要:
from pymysql import * def main(): # 创建Connextion连接 conn = connect(host='localhost', port=3306, user='root', password='', database='test', charset='utf8') # 获取Cursor对象 cursor = conn.... 阅读全文
摘要:
from pymysql import * def main(): # 创建Connextion连接 conn = connect(host='localhost', port=3306, user='root', password='', database='test', charset='utf8') # 获取Cursor对象 cursor = conn.... 阅读全文