<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PHP on Yaohong</title><link>https://yh.timefriend.vip/tags/php/</link><description>Recent content in PHP on Yaohong</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 28 Feb 2021 23:15:20 +0800</lastBuildDate><atom:link href="https://yh.timefriend.vip/tags/php/index.xml" rel="self" type="application/rss+xml"/><item><title>Laravel配置阿里云企业邮箱</title><link>https://yh.timefriend.vip/post/php/aliyunmailconfig/</link><pubDate>Sun, 28 Feb 2021 23:15:20 +0800</pubDate><guid>https://yh.timefriend.vip/post/php/aliyunmailconfig/</guid><description>&lt;h1 id="laravel配置阿里云企业邮箱"&gt;Laravel配置阿里云企业邮箱&lt;/h1&gt;&#10;&lt;p&gt;企业邮箱POP、SMTP、IMAP地址列表如下：&lt;/p&gt;&#10;&lt;p&gt;（阿里云邮箱web端通用访问地址：https://qiye.aliyun.com/），客户端推荐以下参数配置：&lt;/p&gt;</description></item><item><title>PHP autoload</title><link>https://yh.timefriend.vip/post/php/phpautoload/</link><pubDate>Fri, 14 Aug 2020 20:15:20 +0800</pubDate><guid>https://yh.timefriend.vip/post/php/phpautoload/</guid><description>&lt;h1 id="php-autoload"&gt;php autoload&lt;/h1&gt;&#10;&lt;p&gt;In general, when we use a file which not include in current file, we need to load it in current file by using &lt;code&gt;require&lt;/code&gt; or &lt;code&gt;include&lt;/code&gt;;&lt;/p&gt;&#10;&lt;p&gt;But when a project has a lot of php files, it is not a good way to include each file manually.&lt;/p&gt;&#10;&lt;p&gt;Let&amp;rsquo;s see a simple code:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;&amp;lt;?&lt;/span&gt;php&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;$person&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;new&lt;/span&gt; Person(&lt;span style="color:#f1fa8c"&gt;&amp;#34;Rhys&amp;#34;&lt;/span&gt;, &lt;span style="color:#bd93f9"&gt;20&lt;/span&gt;);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;var_dump(&lt;span style="color:#8be9fd;font-style:italic"&gt;$person&lt;/span&gt;);&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There is a new class &lt;code&gt;Person&lt;/code&gt; which didn&amp;rsquo;t be load in current file. In this case, php will call default autoload method　&lt;code&gt;spl_autoload()&lt;/code&gt; in order to load possible class;&lt;/p&gt;</description></item></channel></rss>