<?xml version="1.0" encoding="utf-8"?>
<!--  RSS generated by phpcms.cn RSS Builder [2026-04-07 13:37:34]  --> 
<rss version="2.0" xmlns:im="http://purl.org/rss/1.0/item-images/" xmlns:dc="http://purl.org/dc/elements/1.1/" >
<channel>
<pubDate>Tue, 07 Apr 2026 13:37:34 +0800</pubDate>
<lastBuildDate>Tue, 07 Apr 2026 13:37:34 +0800</lastBuildDate>
<docs>https://www.pweb123.com</docs>
<link>https://www.pweb123.com</link>
<title>PHP基础</title>
<image>
<title>PHP基础</title>
<url><![CDATA[]]></url>
<link>https://www.pweb123.com</link>
</image>
<webMaster>https://www.pweb123.com</webMaster>
<generator>https://www.pweb123.com</generator>
<ttl>60</ttl>
<dc:creator>https://www.pweb123.com</dc:creator>
<dc:date>Tue, 07 Apr 2026 13:37:34 +0800</dc:date>
<item>
<title><![CDATA[PHP ob_start('ob_gzhandler')报错造成页面空白]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/1042.html]]></link>
<description><![CDATA[ob_start()函数将打开输出缓冲。当输出缓冲激活后，脚本将不会输出内容（除http标头外），相反需要输出的内容被存储在内部缓冲区中。但是有时在使用的时候会提示内容编码错误，大概就是两个原因。原因一：服务器不支持这种压缩格式，解决方案 ob_start(&amp; 39;ob_gzhandler&amp; 39;)改成o   ]]></description>
<pubDate>2024-11-28 21:44:57</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/1042.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[php写入txt文件的两种方法]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/1032.html]]></link>
<description><![CDATA[调试的时候有时候需要把错误信息写入txt文件，有两种常用办法1、通过file_put_contents像记事本中追加数据$filePath=&amp; 39;log txt&amp; 39;;$data=&quot;测试数据  r  n&quot;;file_put_contents($filePath,$data,FILE_APPEND);FILE_APPEND表示是追加内容2、通过fwrite方式写入$fp=fopen(&quot;log txt&quot;,&amp;    ]]></description>
<pubDate>2024-07-07 23:02:05</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/1032.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[php如何判断当前HTTPS（踩坑）]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/1031.html]]></link>
<description><![CDATA[在网上搜搜如何判断是https的，一般你会得到下边的答案：if(isset($_SERVER[&amp; 39;HTTPS&amp; 39;])&amp;&amp;(&amp; 39;1&amp; 39;==$_SERVER[&amp; 39;HTTPS&amp; 39;]||&amp; 39;on&amp; 39;==strtolower($_SERVER[&amp; 39;HTTPS&amp; 39;]))){returntrue;}elseif(isset($_SERVER[&amp; 39;SERVER_PORT&amp; 39;])&amp;&amp;(&amp; 39;443&amp; 39;==$_S   ]]></description>
<pubDate>2024-07-03 11:47:33</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/1031.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[php的imagepng函数无法显示图片解决办法]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/1030.html]]></link>
<description><![CDATA[php的GD库下出现imagepng函数无法输出图片的出现的原因可能有以下几种情况：1：文件编码格式带有BOM 头，解决方法，用第3方编码工具，sublime 或 notepad++ 等把 文件格式保存为无BOM 的utf-8 格式2：PHP缓冲区的问题，解决方法利用 ob_clean();清空缓冲区。扩展：常用缓冲区   ]]></description>
<pubDate>2024-07-03 08:18:33</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/1030.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[strrchr()用法]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/1012.html]]></link>
<description><![CDATA[php strrchr()函数 语法作用：返回一个字符串在另一个字符串中最后一次出现的位置，并返回从该位置到字符串结尾的所有字符语法：strrchr(string,char)参数：string 必需。规定要搜索的字符串。char 必需。规定要查找的字符。如果该参数是数字，则搜索匹配此数字的 ASCII 值的字   ]]></description>
<pubDate>2024-01-07 14:31:29</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/1012.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[openssl_decrypt和openssl_encrypt解密方法的使用]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/1002.html]]></link>
<description><![CDATA[openssl_decrypt(string$data,string$method,string$key[,int$options=0[,string$iv=&quot;&quot;[,string$tag=&quot;&quot;[,string$aad=&quot;&quot;]]]])openssl_decrypt() 采用原始或base64编码的字符串，并使用给定的方法和密钥对其进行解密。参数说明：$data 是 将被解密的密文。$method 是 加密算法，使   ]]></description>
<pubDate>2023-11-23 14:44:12</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/1002.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[抖音小程序获取手机号完整代码php端]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/989.html]]></link>
<description><![CDATA[小程序端代码：&lt;buttonclass=&amp; 39;shouquan&amp; 39;open-type=&quot;getPhoneNumber&quot;bindgetphonenumber=&quot;getPhoneNumber&quot;&gt;手机号登录&lt; button&gt;js代码：getPhoneNumber:function(e){varthat=this;if(e detail errMsg==&quot;getPhoneNumber:ok&quot;){varcode=e detail code;  返回codett request({url:   ]]></description>
<pubDate>2023-10-21 23:04:01</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/989.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[MySQL错误-this is incompatible with sql_mode=only_full_group_by解决方案]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/977.html]]></link>
<description><![CDATA[<img src=https://www.pweb123.com/uploadfile/2023/0819/thumb_150_150_20230819100245684.png border='0' /><br />MySQL查询时报错：this is incompatible with sql_mode=only_full_group_by报错原因分析：一、原理层面这个错误发生在mysql 5 7 版本及以上版本会出现的问题：mysql 5 7版本默认的sql配置是:sql_mode=&quot;ONLY_FULL_GROUP_BY&quot;，这个配置严格执行了&quot;SQL92标准&quot;。很多从5 6升级到5    ]]></description>
<pubDate>2023-08-19 21:58:18</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/977.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[bcadd 函数用法（php）]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/976.html]]></link>
<description><![CDATA[bcadd &mdash; 两个任意精度数字的加法计算bcadd(string$num1,string$num2,?int$scale=null):string对 num1 和 num2 求和。num1：左操作数，字符串类型。num2：右操作数，字符串类型。scale：此可选参数用于设置结果中小数点后的小数位数。也可通过使用 bcscale() 来设置全局默认   ]]></description>
<pubDate>2023-08-17 20:56:00</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/976.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[phpexcel不支持php7.4修改f方案]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/974.html]]></link>
<description><![CDATA[由于PHPexcel里边用了大量的花括号方式来读取字符串或者数组的偏移量，造成无法支持php7 4以及更高版本，比如：$str{0}  调用第一个字符$str{1}  调用第二个字符这种写法已经被抛弃了，所以造成报错，尝试批量替换发现不行，因为一不小心就把正则里边的${1}给替换了，所以最好的办法   ]]></description>
<pubDate>2023-07-30 22:00:39</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/974.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[一个经典的PHP加密解密算法authcode]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/972.html]]></link>
<description><![CDATA[项目中有时我们需要使用PHP将特定的信息进行加密，也就是通过加密算法生成一个加密字符串，这个加密后的字符串可以通过解密算法进行解密，便于程序对解密后的信息进行处理。最常见的应用在用户登录以及一些API数据交换的场景。最常见的应用在用户登录以及一些API数据交换的场景。笔者   ]]></description>
<pubDate>2023-07-07 17:55:23</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/972.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[count(): Parameter must be an array or an object that implements Countable 报错问题解决]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/961.html]]></link>
<description><![CDATA[PHP7 2版本之后，count()函数的参数无效时会抛出该warning警告。报错信息：Warning: count(): Parameter must be an array or an object that implements Countable解决办法一、降低PHP版本，但这样就享受不到php版本升级带来的程序运行效率的提升。解决办法二、自然就是   ]]></description>
<pubDate>2023-06-24 15:54:37</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/961.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[PHP错误：Illegal string offset 'data'的解决方法]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/960.html]]></link>
<description><![CDATA[PHP项目错误日志error_log php中报错 Illegal string offset &amp; 39;data&amp; 39;，意为不合法的字符串偏移&amp; 39;data&amp; 39;，即数组里面有空数组，空数组里没有data这个字段。定位到代码片段，意为$r[&amp; 39;data&amp; 39;]可能是空数组。解决方法：进行下一步操作前，先对字符串数组用isset(   ]]></description>
<pubDate>2023-06-24 15:52:11</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/960.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[【踩坑日志】nginx伪静态最后无斜杠的时候报404错误]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/957.html]]></link>
<description><![CDATA[Nginx中配置location的匹配规则时，访问URL时末尾加上斜杠 可以访问，末尾不加斜杠 就会报404错误。解决思路：既然加斜杠 可以匹配，那么可以对不加斜杠 的URL进行重写，末尾加上斜杠，然后重定向。使用Nginx中ngx_http_rewrite_module。首先判断请求资源是否为目录类型if ( -d $r   ]]></description>
<pubDate>2023-06-23 10:51:00</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/957.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[php文字生成图片并设置文字居中]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/956.html]]></link>
<description><![CDATA[在网页开发中，在图片中添加一些文字是一种很常见的需求，如果希望文字能够居中显示，就需要对 php 中的 gd 库进行相应的设置。PHP GD 库是 PHP 的图形处理库，它可以用来创建和操作图像。通过 GD 库，我们可以在图片上添加文字、画线、画图形等一系列操作，从而实现定制化   ]]></description>
<pubDate>2023-06-22 21:18:11</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/956.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[imagettftext(): Could not find/open font不能打开或者引入字体报错]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/955.html]]></link>
<description><![CDATA[<img src=https://www.pweb123.com/uploadfile/2023/0622/thumb_150_150_20230622010830229.jpg border='0' /><br />上图为报错提示最近公司项目需要用php创建画布 ，在画布里面添加图片以及文章遇到了这个问题问题原因：imagettftext () 函数中添加字体时要加载字体文件图中报错提示为字体文件加载有问题解决办法：    文字$font=dirname(__FILE__) &quot; hw ttf&quot;;  字体文件imagettftext($bg_image,2   ]]></description>
<pubDate>2023-06-22 13:05:37</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/955.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[php文字生成图片]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/954.html]]></link>
<description><![CDATA[PHP处理图片PHP使用GD库创建和处理包括GIF，PNG，jpef，wbmp以及xpm在内的多种格式的图像。以下教程：图片合成文字，实现合成文字水平、垂直居中。读取图片资源imagecreatefrom 系列函数用于从文件或 URL 载入一幅图像，成功返回图像资源，失败则返回一个空字符串。根据图片格式选   ]]></description>
<pubDate>2023-06-22 13:03:30</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/954.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[PHP curl 请求中添加 Authorization token]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/952.html]]></link>
<description><![CDATA[PHP curl 请求中添加 Authorization token ;经过测试用一下方式设置 header 参数，可以成功获取数据$accessToken=&quot;6666666666669999999999&quot;;$headers[]=&quot;Accept:application json&quot;;$headers[]=&quot;Authorization:Bearer&quot; $accessToken;curl 参数设置如下：if(!empty($headers)){   ]]></description>
<pubDate>2023-06-16 08:05:07</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/952.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[php 无法获取到header里的Authorization信息]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/951.html]]></link>
<description><![CDATA[使用Authorization的token做登录权限验证时，发现PHP在后台获取不到Authorization，在$_SERVER中也查询不到，修改Apache后成功获取。解决方法：对 htaccess文件进行如下修改：&lt;IfModulemod_rewrite c&gt;Options+FollowSymlinks-MultiviewsRewriteEngineOnRewriteBase RewriteCond%{REQU   ]]></description>
<pubDate>2023-06-16 07:55:23</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/951.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
<item>
<title><![CDATA[PHP curl 获取当前请求 header 信息]]></title>
<link><![CDATA[https://www.pweb123.com/html/php/949.html]]></link>
<description><![CDATA[工作中经常需要对接第三方 api ，排查问题的时候需要提供请求详细参数信息。有时候可能是认证头 Authorization 有误，如果不一并记录获取提供检查，可能会走很多弯路都不能发现问题所在。正常 curl 获取响应结果$url=&amp; 39;url xx server&amp; 39;;$data=[&amp; 39;param&amp; 39;=&gt;&amp; 39;tes   ]]></description>
<pubDate>2023-05-29 21:39:34</pubDate>
<guid><![CDATA[https://www.pweb123.com/html/php/949.html]]></guid>
<author>https://www.pweb123.com</author>
</item>
</channel>
</rss>
