<br />
<b>Warning</b>:  putenv() has been disabled for security reasons in <b>/www/wwwroot/wiki.xtboke.com/includes/Setup.php</b> on line <b>309</b><br />
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>http://wiki.xtboke.com/index.php?action=history&amp;feed=atom&amp;title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93</id>
	<title>PHP公共函数库 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.xtboke.com/index.php?action=history&amp;feed=atom&amp;title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93"/>
	<link rel="alternate" type="text/html" href="http://wiki.xtboke.com/index.php?title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93&amp;action=history"/>
	<updated>2026-04-11T23:44:56Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>http://wiki.xtboke.com/index.php?title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93&amp;diff=174&amp;oldid=prev</id>
		<title>2024年4月11日 (四) 09:24 Xiaotian</title>
		<link rel="alternate" type="text/html" href="http://wiki.xtboke.com/index.php?title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93&amp;diff=174&amp;oldid=prev"/>
		<updated>2024-04-11T09:24:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024年4月11日 (四) 17:24的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot;&gt;第32行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第32行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;php基础&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;php&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Xiaotian</name></author>
	</entry>
	<entry>
		<id>http://wiki.xtboke.com/index.php?title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93&amp;diff=173&amp;oldid=prev</id>
		<title>2024年4月11日 (四) 09:23 Xiaotian</title>
		<link rel="alternate" type="text/html" href="http://wiki.xtboke.com/index.php?title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93&amp;diff=173&amp;oldid=prev"/>
		<updated>2024-04-11T09:23:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024年4月11日 (四) 17:23的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot;&gt;第32行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第32行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;php]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;php基础&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category:thinkphp&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Xiaotian</name></author>
	</entry>
	<entry>
		<id>http://wiki.xtboke.com/index.php?title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93&amp;diff=13&amp;oldid=prev</id>
		<title>Xiaotian：​创建页面，内容为“=== 1.日志记录 ===  LOG_PATH为THinkPHP系统的，可以替换为自己的。 &lt;pre&gt; function logWrite($data,$fix='',$type='DEBUG'){     //设置路径目录信息     $url = LOG_PATH.'apilogs/'.date('Ym').'/'.date('d').'.txt';     $dir_name = dirname($url);     //目录不存在就创建     if(!file_exists($dir_name)){         //iconv防止中文名乱码         $res = mkdir(iconv(&quot;UTF-8&quot;, &quot;GBK&quot;, $dir_name),0777,true);     }     // 处理数据 var_expor…”</title>
		<link rel="alternate" type="text/html" href="http://wiki.xtboke.com/index.php?title=PHP%E5%85%AC%E5%85%B1%E5%87%BD%E6%95%B0%E5%BA%93&amp;diff=13&amp;oldid=prev"/>
		<updated>2024-04-08T12:48:38Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“=== 1.日志记录 ===  LOG_PATH为THinkPHP系统的，可以替换为自己的。 &amp;lt;pre&amp;gt; function logWrite($data,$fix=&amp;#039;&amp;#039;,$type=&amp;#039;DEBUG&amp;#039;){     //设置路径目录信息     $url = LOG_PATH.&amp;#039;apilogs/&amp;#039;.date(&amp;#039;Ym&amp;#039;).&amp;#039;/&amp;#039;.date(&amp;#039;d&amp;#039;).&amp;#039;.txt&amp;#039;;     $dir_name = dirname($url);     //目录不存在就创建     if(!file_exists($dir_name)){         //iconv防止中文名乱码         $res = mkdir(iconv(&amp;quot;UTF-8&amp;quot;, &amp;quot;GBK&amp;quot;, $dir_name),0777,true);     }     // 处理数据 var_expor…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== 1.日志记录 ===&lt;br /&gt;
&lt;br /&gt;
LOG_PATH为THinkPHP系统的，可以替换为自己的。&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function logWrite($data,$fix='',$type='DEBUG'){&lt;br /&gt;
    //设置路径目录信息&lt;br /&gt;
    $url = LOG_PATH.'apilogs/'.date('Ym').'/'.date('d').'.txt';&lt;br /&gt;
    $dir_name = dirname($url);&lt;br /&gt;
    //目录不存在就创建&lt;br /&gt;
    if(!file_exists($dir_name)){&lt;br /&gt;
        //iconv防止中文名乱码&lt;br /&gt;
        $res = mkdir(iconv(&amp;quot;UTF-8&amp;quot;, &amp;quot;GBK&amp;quot;, $dir_name),0777,true);&lt;br /&gt;
    }&lt;br /&gt;
    // 处理数据 var_export($data)&lt;br /&gt;
    $data = is_array($data)?json_encode($data,JSON_UNESCAPED_UNICODE):$data;&lt;br /&gt;
    $fix = $fix?$fix.' &amp;gt; ':'';&lt;br /&gt;
    $content = date(&amp;quot;Y-m-d H:i:s&amp;quot;).' &amp;gt; '.$type.' &amp;gt; '.$fix.$data.&amp;quot;\r\n&amp;quot;;&lt;br /&gt;
    //打开文件资源通道 不存在则自动创建&lt;br /&gt;
    $fp = fopen($url,&amp;quot;a&amp;quot;);&lt;br /&gt;
    fwrite($fp,$content);//写入文件&lt;br /&gt;
    fclose($fp);//关闭资源通道&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2.手机号替换星号 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function replaceTel($tels) {&lt;br /&gt;
    $new_tels = substr_replace($tels, '****', 3, 4);&lt;br /&gt;
    return $new_tels;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category:php]]&lt;br /&gt;
[[category:thinkphp]]&lt;/div&gt;</summary>
		<author><name>Xiaotian</name></author>
	</entry>
</feed>