<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
  <channel>
    <title><![CDATA[拍拍尘土]]></title> 
    <link>http://blog.xg98.com/</link> 
    <description><![CDATA[五月枇杷黄，太湖银鱼肥]]></description> 
    <language>zh-cn</language> 
    <copyright><![CDATA[Copyright 2026, 拍拍尘土]]></copyright> 
    <webMaster><![CDATA[cxosoft@gmail.com (Admin)]]></webMaster> 
    <generator>LBS v2.0.313</generator> 
    <pubDate>Mon, 04 May 2026 19:35:38 +0800</pubDate> 
    <ttl>60</ttl>
  
    <item>
      <title><![CDATA[Windows系统下64位PHP中PHP_INT_MAX为32位BUG，替换strtotime()和date()函数，解决1970年前及2038年后问题]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2999]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Wed, 14 May 2025 14:48:55 +0800</pubDate> 
      <description><![CDATA[<span style="color:Red">p.s.时间戳加到2038-01-19 就不可以往上加了，原因是32位的unix时间戳漏洞，称为Y2K38 漏洞。linux下64位的系统不受此影响。<br />windows下php7以下版本即使操作系统和php都更新到64位还是有这个问题，为彻底解决需要升级php到7以上版本。</span><br /><br />在操作系统和php不升级到64位的前提下，解决办法：<br />PHP下Unix时间戳与日期互转，<span style="color:Red">代替strtotime()和date()</span>（解决1970年前及2038年后问题，解决32位系统下的int最大长度问题）<br /><div class="code">//这个问题主要在32位的系统下出现，64位的不存在这样的问题。<br />//php 5.2+提供了DateTime类来处理这样的问题，参考方案如下（请注意时区的处理）：<br />&nbsp;&nbsp; <br /><br />//1、Unix时间戳转日期</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2999]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[一则windows下运行php出现No input file specified 错误处理记录]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2995]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Fri, 25 Apr 2025 10:48:25 +0800</pubDate> 
      <description><![CDATA[windows服务器为 nginx+fastcgi 的php运行模式，使用winsw-1.18来安装nginx和php fastcgi的，作为服务运行。 <a href="http://blog.xg98.com/article.asp?id=2996" title="http://blog.xg98.com/article.asp?id=2996" target="_blank">http://blog.xg98.com/article.asp?id=2996</a><br />搭建环境出现 <span style="color:Red">No input file specified</span> 目录错误的提示<br /><br />nginx的配置中写为<div class="code">root  H:/web/blog.xg98.com/wwwroot;</div><br />php.ini中为 <div class="code">open_basedir = &quot;h:/web/;C:/WINDOWS/TEMP/;&quot;</div><br />可以看到盘符存在大小写的差异，把nginx.conf的root值改为小写 h:/web/blog.xg98.com/wwwroot; 错误消失]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2995]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[解决PHP数组排序后，键值丢失的问题]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2975]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Fri, 07 Jun 2024 14:15:19 +0800</pubDate> 
      <description><![CDATA[<span style="color:Red">array_multisort，可以多个数组同时排序，先保存键值，同时排序后再合并数组可以解决键值丢失问题。</span><br /><br />解决array_multisort关联索引不变，但数字键名会被重置问题<div class="code">$array = [<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &#39;2&#39; =&gt; [<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;title&#39; =&gt; &#39;Flower&#39;,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;order&#39; =&gt; 3<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; ],<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &#39;3&#39; =&gt; [<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;title&#39; =&gt; &#39;Rock&#39;,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;order&#39; =&gt; 1<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; ],<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &#39;4&#39; =&gt; [<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;title&#39; =&gt; &#39;Grass&#39;,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;order&#39; =&gt; 2<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; ]<br />];<br /><br />$keys = array_keys($array);<br />array_multisort(<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; array_column($array, </div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2975]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[Composer，免费的php依赖代码插件库，可以帮助方便下载、更新、使用]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2974]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Sun, 02 Jun 2024 22:06:53 +0800</pubDate> 
      <description><![CDATA[<b>Composer是什么东西?</b><br />Composer是PHP的一个依赖管理工具<br />它允许我们声明项目所依赖的库称为包或组件，然后它会自动为我们下载和管理这些依赖<br /><br /><b>下载Composer</b><br />检查好环境之后，我们就可以打开以下地址，进入官网进行下载     <a href="https://getcomposer.org/" title="https://getcomposer.org/" target="_blank">https://getcomposer.org/</a><br />window环境下进行安装所以我们直接点击 Composer-Setup.exe 这个超级链接<br /><br /><b>检查Composer是否安装成功</b><br />在Composer安装的时候，会自动把路径映射到环境变量中<br />所以我们打开cmd输入Composer如果看到以下信息说明你安装成功了!<br /><br /><b>Composer代码资源是从哪里来的?</b><br />有没有想过在你使用Composer的时候,Composer是从什么地方去获取的这些插件、代码库、模块功能等资源的呢<br />我们从Composer拉下]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2974]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[php分割GBK中文生僻字乱码的解决方法，任何低字节是7c的字都会有这个问题]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2938]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Wed, 06 Sep 2023 09:51:55 +0800</pubDate> 
      <description><![CDATA[php在分割gbk编码格式的中文字符串时，容易出现乱码，应该如何解决这个问题呢？需要的朋友，参考下本文中的介绍吧。<br /><br />类似如下的字符串(GBK), explode不能得到正确结果: $result = explode(&quot;|&quot;, &quot;滕华弢|海青&quot;);<br /><br />究其原因, 对于”弢”字(读tao,不认识没关系,我也不认识), 因为他的GBK编码值为: 8f7c, 不巧的是, “|”的ASCII值也是7c.<br /><br />还有一些类似的问题: 因为GBK编码的编码范围是: 0×8140-0xfefe, 所以, 理论上来说, 任何低字节是7c的字都会有这个问题, 比如: 倈(827c), 億(837c), 眧(b17c), 鍇(e57c).......等等等等<br /><br />对于这样的情况, <br />第一, 可以采用转码到utf8, 然后explode, 再转回来, 这是比较麻烦的方法. <br />第二, 我们可以采用正则拿&quot;匹配出&quot;来代替&quot;分离出&quot;: preg_match_all(&quot;/([/x81-/xfe]]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2938]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[php程序GBK编码下生僻字&#39;碶&#39;等字的处理引起编码乱码问题，生僻字输出带反斜杠]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2936]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Wed, 26 Jul 2023 16:19:26 +0800</pubDate> 
      <description><![CDATA[p.s.   var_export() 可以看到生僻字输出带反斜杠\，平时网页输出看不出来。有一次入库生僻字及其后面乱码，增加一个反斜杠就正常了<div class="code">$str = str_replace(&quot;\\&quot;,&quot;\\\\&quot;,$str);</div><br /><br />工作中发现PHP处理GBK格式的生僻字 ‘碶’ 时会遇到的问题。没能深入研究编码层面的原因。不知道是PHP的bug还是GBK编码的锅。如果有大神发现这篇文章欢迎讨论<br />//1、直接把‘碶’赋值给变量<br /><br />$str = &#39;碶&#39;;<br /><br />echo $str;//会报500错误<br /><br />//2、如果‘碶’字后面随便接一个字符或者汉字则不会报错<br /><br />$str = &#39;碶大&#39;;<br /><br />echo $str;//输出 碶大<br /><br />//3、var_export查看结果<br /><br />var_export($str);//输出 &#39;碶\大&#39;<br /><br />$str = var_export($str, true);<br />]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2936]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[fckeditor php 自定义上传目录和上传文件重命名的设置]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2928]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Tue, 09 May 2023 16:34:17 +0800</pubDate> 
      <description><![CDATA[首先：我希望上传的文件根据日期来组织文件夹 <br />请修改editor\editor\filemanager\connectors\php文件夹下的：config.php文件 <br />找到如下的内容： <div class="code">// Path to user files relative to the document root. <br />$Config[&#39;UserFilesPath&#39;] = </div>修改为： <div class="code">// Path to user files relative to the document root. <br />$Config[&#39;UserFilesPath&#39;] = &#39;/uploadfiles/&#39;.date(&quot;Ym&quot;).&quot;/&quot; ; </div>这样上传的文件就按照日期存放了。 <br /><br /><br />其次：重命名 <br />请修改该文件夹下的io.php文件 <br />找到： &#91;code]&#91;/code]]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2928]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[PHP中的array_shift()函数从数组中删除第一个元素，并返回已删除元素的值。]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2924]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Mon, 10 Apr 2023 13:35:40 +0800</pubDate> 
      <description><![CDATA[<div class="code">&lt;?php<br />$products = array(&quot;Electronics&quot;, &quot;Accessories&quot;, &quot;Shoes&quot;, &quot;Toys&quot;, &quot;Groceries&quot;);<br />$res = array_shift($products);  //$res = ‘Electronics’  注意返回的是删除的那个元素，而数组本身已经被改变<br />print_r($products);<br />?&gt;</div><br />第一个值“ Electronics”被分配给“ $res”-<br /><br />Array (<br /> &nbsp; &nbsp; &nbsp; [0] =&gt; Accessories<br /> &nbsp; &nbsp; &nbsp; [1] =&gt; Shoe<br /> &nbsp; &nbsp; &nbsp; [2] =&gt; Toys<br /> &nbsp; &nbsp; &nbsp; [3] =&gt; Groceries<br />)]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2924]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[解决php mb_substr函数中文乱码问题]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2870]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Sat, 20 Aug 2022 14:51:08 +0800</pubDate> 
      <description><![CDATA[PHP用substr截取字符串出现中文乱码问题用 mb_substr<br /><br />实例：<br />mb_substr(&#39;截取中文乱码问题测试&#39;,0,5, &#39;utf-8&#39;);<br />$rest = substr (&quot;中国人&quot;, 1, -1); // returns &quot;fdsafsda&quot; 就是乱码了<br /><br /><br />解决办法主要有两种：<br /><br /><b>一、使用mbstring扩展库的mb_substr()截取就不会出现乱码了。</b><br /><br />可以用mb_substr()/mb_strcut()这个函数，mb_substr()/mb_strcut()的用法与substr()相似，只是在mb_substr()/mb_strcut最后要加入多一个参数，以设定字符串的编码，<br /><br />但是一般的服务器都没打开php_mbstring.dll，需要在php.ini在把php_mbstring.dll打开。<div class="code">echo mb_substr(&quot;php中文字符encode&quot;,0,4,&quot;utf-8&quot;);</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2870]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[关于nginx+php服务器启用session，使用函数json_encode后链接自动加上PHPSESSID参数，造成json串解析失败的问题]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2868]]></link> 
      <category><![CDATA[PHP]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Wed, 01 Jun 2022 16:18:26 +0800</pubDate> 
      <description><![CDATA[p.s.其他centos服务器还没有遇到这个问题，或者说尚不清楚是否存在这个问题<br /><br />原始字符串<div class="code">&lt;a href=&quot;mailto:666666@qq.com &quot;&gt;666666@qq.com&lt;/a&gt;</div><br />正常json_encode()后<div class="code">&lt;a href=\&quot;mailto:666666@qq.com \&quot;&gt;666666@qq.com&lt;\/a&gt;</div><br />目前遇到的问题是 json_encode 后自动加了 ?PHPSESSID=AAAAAAAAAAA ，造成json字符串无法正常解析了<div class="code">&lt;a href=\?PHPSESSID=AAAAAAAAAAA&quot;mailto:666666@qq.com \&quot;&gt;666666@qq.com&lt;\/a&gt;</div><br /><br /><b>解决办法：</b><br />在php.ini中配置为<div class="code">session.use_only_cookies = 1;</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2868]]></wfw:commentRss>
    </item>
      
  </channel>
</rss>
