php 由ttf字体文件生成png预览图<?php /** * Created by graph-design-api. * AUTHOR: daiguojin * Date: 2020/9/16 9:40 */ //header("Content-type: image/png"); // The text to draw $text = 'ABeeZ...
/**中间加密 字符串截取法 */public static function encryptTel($tel) {$new_tel = substr($tel, 0, 3).'****'.substr($tel, 7); return $new_tel;} /**中间加密 替换字符串的子串 */public static function encryptTel($tel...
<?php $ts = time(); $last_monday = last_monday($ts); // echo date('Y-m-d H:i:s', $last_monday); echo "上个星期一:".date('Y-m-d', $last_monday); echo "<br>"; $last_xinqitian ...
PHP携带Cookie用Curl进行Post或Get请求获取数据PHP全能Curl请求/** * curl发送HTTP请求方法 * @param $url * @param string $method * @param array $params * @param array $header * @param int $timeout * @param bool|false ...
码代码时容易用到的基础函数总结。上代码//PHP设置跨域header("Access-Control-Allow-Origin:*");//PHP设置JSON头 以JSON格式输出header("Content-type:application/json; charset=utf-8");//正则取字符串preg_match_all('/字符串(.*?)字符串/i',$data,$out);...
<?php require('./wp-blog-header.php'); header("Content-type: text/txt"); header('HTTP/1.1 200 OK'); $posts_to_show = 1000; // 获取文章数量 ?> <?php echo 'http://'.$_SERVER['HTTP_HOST']...
PHP IP地址归属地,支持IPv6地址(离线数据库,定期更新)为什么建立这个库政府在大力推进IPv6建设,作者响应国家号召,整合网络免费数据库,制作成离线版供大家使用国家公文链接:关于开展2019年IPv6网络就绪专项行动的通知使用方法安装composer require ritaswc/zx-ip-address直接使用$result = \Ritaswc\ZxIPAddress\IPv...
方法function http($url, $method="GET", $postfields = '', $headers = [], $debug = false, $timeout=60) { $method = strtoupper($method); $ci = curl_init(); curl_setopt($ci, CURLOPT...
<?php /** * Created by PhpStorm. * User: Administrator * Date: 2018/10/13 * Time: 10:25 */ class ImportData{ //数据库信息 private $dbhost; private $dbuser; private $dbpw; pri...
<?php function insert($file,$database,$name,$root,$pwd)// { //将表导入数据库 header("Content-type: text/html; charset=utf-8"); $_sql = file_get_contents($file)...