摘要:php: function php_hmac_sha256($secret, $message) { $hmac = hash_hmac('sha256', $message, $secret); return $hmac; } java: /** * 使用HMAC-SHA256算法生成签名 * *
阅读全文
摘要:PhpStorm 2023.2.3 + php5.6 参考:PHPStorm官方, PhpStorm配置Xdebug(超详细), xdebug下载与配置,有这一篇就够了 1.到官网下载 xdebug dll, 因为我用的是php 5.6的, 所以要下载历史版本的dll https://xdebug.
阅读全文
摘要:php附件多3个字节问题, 保存的php文件, 要选择utf-8无bom格式, 如果php文件有bom, 生成的exe也会有bom
阅读全文
摘要:$txt = GetRemoteText($url); if(strlen($txt) > 0) { $xml = simplexml_load_string($txt); //获取xml if($xml) { $logo = $xml->xpath("webinfo"); $title = $xm
阅读全文
摘要:function utf8_urldecode($str) { $str = preg_replace("/%u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($str)); return html_entity_decode($str,null,'UTF-8');;
阅读全文
摘要:php抓取当前页面中所有链接,再分析下载想要下载的链接,保存到数据库代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<?PHP//GETalllinksfromURLfunctionremove_html_tags(&$item,$k...
阅读全文
摘要:1.php中用smarty模板生成的html在浏览器中顶部有一空行.2.用firedebug发现 meta和link标记在body标签里.本机上wmap运行没事, 送到远程服务器上是IASP的服务, 会出现上述bug.看了下源文件, 文本一样的. 但保存时提示编码问题.估计是utf-8问题了.在网上找了下, 是utf-8 BOM问题.解决方法: 用UltraEdit32把smarty模板文件即引用...
阅读全文