<?xml version="1.0" encoding="big5"?>
<rss version="2.0">
  <channel>
    <title>中央論壇 - CENTER BBS - PHP 教學</title>
    <link>https://centerbbs.com/forum.php?mod=forumdisplay&amp;fid=541</link>
    <description>Latest 20 threads of PHP 教學</description>
    <copyright>Copyright(C) 中央論壇 - CENTER BBS</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Mon, 27 Jul 2026 22:52:30 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>https://centerbbs.com/static/image/common/logo_88_31.gif</url>
      <title>中央論壇 - CENTER BBS</title>
      <link>https://centerbbs.com/</link>
    </image>
    <item>
      <title>PHP/前端/WEB 網頁開發知識 - YIDAS Code</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=166302</link>
      <description><![CDATA[YIDAS Code - 網頁開發知識| Web-Dev Blog]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Sat, 27 Oct 2018 03:56:09 +0000</pubDate>
    </item>
    <item>
      <title>[PHP][Yii2] 子目錄部屬架構 - 設定 $request-&gt;baseUrl 修正Url與PrettyUrl</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=162524</link>
      <description><![CDATA[Yii2部屬上，如果不是在Domain根目錄，要部屬Yii2恐造成Base Url錯亂及PrettyUrl後的Route吃不進Yii。

例如，在Nginx location目錄名與實體uri(Sub document root in location)不一樣下，預設的Yii其Base Url會以uri為主而非Nginx location目錄名，另外PrettyUrl因為 ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Fri, 22 Jan 2016 03:52:27 +0000</pubDate>
    </item>
    <item>
      <title>[PHP] 回傳JSON，最好修改Header (Content-Type: application/json)</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=162249</link>
      <description><![CDATA[PHP Header code for JSON response:[hr]

另外補上XML： 回傳JSON資料格式，Header修改 (Content-Type: application/json)]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Wed, 09 Dec 2015 02:03:51 +0000</pubDate>
    </item>
    <item>
      <title>[PHP] 數學數字函數彙整 - Numeric Functions (小數點.etc)</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161963</link>
      <description><![CDATA[此為PHP數學數字函數彙整，將會持續增改維護。

[hr]

number_format()
數字格式化，千位分組，支援小數點。[hr]

round() 
四捨五入，支援小數位數

ceil()
無條件進入

floor()
無條件捨去

 數學數字格式函數彙整 - Numeric Format Functions - (小 ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Fri, 23 Oct 2015 03:15:40 +0000</pubDate>
    </item>
    <item>
      <title>[PHP-MySQL] 資料庫健康狀態撰寫 - Database status</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161795</link>
      <description><![CDATA[之前看過一個資料庫狀態表，列出了各資料庫包含Master-Slave的狀態來視為健康指標，以下就簡單介紹其指標原理：

[hr]

1. Process List很基本的查看DB程序指令，拿出來後可以從Commend欄位下手，如挑出非Sleep狀態之程序合計作為執行中程序量，在與總程序量作百分 ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Mon, 14 Sep 2015 11:17:32 +0000</pubDate>
    </item>
    <item>
      <title>Linux - umask – 預設檔案權限 (shell 內建指令)</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161593</link>
      <description><![CDATA[用於設置初始建立檔案的權限預設值，實際用途上某些Hosting可能就會體會為什麼要設定這個。

以下說明及範例引用自umask(1)預設檔案權限，說的已經很清楚了！

[hr]
語法:

bash
umask [-p] [-S] [mode]

tcsh
umask [value]

說明:

每當使用者新增檔案 ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Fri, 03 Jul 2015 16:15:23 +0000</pubDate>
    </item>
    <item>
      <title>vim / vi 編碼設定 - UTF8 BIG5 中文編碼解決</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161531</link>
      <description><![CDATA[Linux vim 或 vi 對UTF8編碼需要額外設定(例如cygwin)，兩個個別設定檔如下：[hr]
設定預設的寫入編碼：設定多種編碼顯示：設定快捷鍵 (編輯器內)：]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Sat, 20 Jun 2015 08:03:14 +0000</pubDate>
    </item>
    <item>
      <title>Linux - clear completely 完全清空Termimal畫面 (echo -e \\\\033c)</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161511</link>
      <description><![CDATA[厭煩了Run PHP顯示過多資料，又每條執行資料承上啟下，clear半天往上scroll回去資料還在的窘境嗎?

下這個指令就對了：Alias後Terminal clear就海闊天空...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Sat, 13 Jun 2015 07:19:08 +0000</pubDate>
    </item>
    <item>
      <title>BAT批次檔做PHP工作排程器 - 適用WAMP (Crontab on Win)</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161503</link>
      <description><![CDATA[在Windows上裝了WAMP等PHP環境，但想要做Linux Crontab這種工作排程，這時在Windwos環境就可以使用 .bat 批次檔搭配工作排程器(Management Console)完成！

新增的 .bat檔內文指令範例如下：有了以上 .bat檔即可加入至工作排程器 (控制台\\系統及安全性\\系統管理工具) ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Wed, 10 Jun 2015 03:02:21 +0000</pubDate>
    </item>
    <item>
      <title>[Yii2] 資料庫三層使用範例 - Database Uasge Demo of Yii</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161496</link>
      <description><![CDATA[Yii2 work with Database]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Sun, 07 Jun 2015 11:07:20 +0000</pubDate>
    </item>
    <item>
      <title>Linux kill 指令 -常用參數 (暫停|繼續) 應用於 ps aux</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161485</link>
      <description><![CDATA[若要好好的控制 ps aux，那 Kill 指令不能少 。除了直接 kill 掉程序以外，可能會需要暫停再繼續等情況。

kill 指令：[hr]
以下就列出可用參數表：



一般關機的情況下OS預設是使用TERM(15) kill proccess，無法終止才會送 KILL(9) 強制終止。]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Thu, 04 Jun 2015 02:35:38 +0000</pubDate>
    </item>
    <item>
      <title>PHP mail() UTF-8 亂碼解決 - 寄件者名稱與信件標題中文亂碼問題</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161459</link>
      <description><![CDATA[UTF-8內文傳遞是基本款，header內請記得設定編碼：但寄件者名稱與標題勒? 這問題很有趣，因為這兩項不屬於內文所以mail source就會看出原因了，在多數的mail軟體上應該就能體會到亂碼(如Gmail)。所以用PHP原生mail()函式就得需自行處理編碼。

[hr]

編碼的處理語法 ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Sun, 31 May 2015 16:19:47 +0000</pubDate>
    </item>
    <item>
      <title>[Git] .git版本控制系統 - 指令速查表 (彙整教學)</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=161457</link>
      <description><![CDATA[以下為彙整其他Git資料加上自己持續再更新修改，如有問題或建議歡迎回覆！


注意事項

由 project/.git/config 可知當前Config

origin(remote) 是 Repository 的版本
master(branch) 是 local 端, 正在修改的版本
平常沒事不要去動到 origin, 如果動到, 可用 ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Sun, 31 May 2015 06:56:16 +0000</pubDate>
    </item>
    <item>
      <title>HTTP續傳實作(Header Range): Output a file with HTTP range header in PHP (ex.mp4)</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=160268</link>
      <description><![CDATA[HTTP streaming 使用PHP實作，我是參考原文：Output a file with HTTP range header in PHP，

經我修改後，以下為我的Header Range Output Function:[hr]

另外找到一個實作，來自GitHub上的Support HTTP Header Range，

這個寫法對我而言沒甚麼好修改的，所以 ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Wed, 15 Apr 2015 10:03:49 +0000</pubDate>
    </item>
    <item>
      <title>套件指令：apt (apt-get/apt-cache) &amp; dpkg 速查表</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=160174</link>
      <description><![CDATA[apt 指令：dpkg 指令：

[hr]]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Fri, 10 Apr 2015 08:16:12 +0000</pubDate>
    </item>
    <item>
      <title>取整數函數 - (round, ceil, floor) - 四捨五入、無條件</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=152287</link>
      <description><![CDATA[以上~]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Fri, 01 Aug 2014 06:14:30 +0000</pubDate>
    </item>
    <item>
      <title>變數型態轉換 - PHP 的型別轉換</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=152133</link>
      <description><![CDATA[PHP 變數要做強迫轉換變數型態的方法有兩種：

1. 使用 C 語言 type casting 語法，例如：可使用的 cast 型別有：



type casting 型別轉換範例。範例 1：範例 2：範例 3：[hr]
2. 使用 settype 函數：

int settype(string var, string type);
將 var 變數 ...]]></description>
      <category>PHP 教學</category>
      <author>郭子錢</author>
      <pubDate>Fri, 25 Jul 2014 03:03:47 +0000</pubDate>
    </item>
    <item>
      <title>Linux - vi 與 vim 指令一覽表整理</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=150681</link>
      <description><![CDATA[vi的寫code改code實在有它特有的魅力，我這邊轉載整理了vi / vim的指令，這樣就不用再去設快捷鍵(像Mac Terminal的\&quot;/033[5~\&quot;)，用原汁原味的指令實在不錯!!!

[hr]
vi 是 unix 家族下最功\能強大的文字編輯器，讓用戶只要使用一個鍵盤就可以完成所有的編輯。而 vim 則 ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Mon, 19 May 2014 02:42:42 +0000</pubDate>
    </item>
    <item>
      <title>Linux cron jobs crontab 排程使用教學 - 例行性工作排程(crontab)</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=150608</link>
      <description><![CDATA[這篇我會放在這還是因為以PHP為出發點，相信PO在這會有幫助。

原文：cron jobs crontab 排程教學



在linux系統中，如 freebsd，cron 排程的資料是存在/etc/crontab中，我們可以直接輸入 vi /etc/crontab進行編輯。Linux Cron 指令crontab -e&amp;nbsp;編輯排程 (ed ...]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Thu, 15 May 2014 03:43:52 +0000</pubDate>
    </item>
    <item>
      <title>[PHP] Server環境變數鍵名一覽表 - ($_SERVER[\'REMOTE_ADDR\'])</title>
      <link>https://centerbbs.com/forum.php?mod=viewthread&amp;tid=150280</link>
      <description><![CDATA[本人有自行加了鍵名。

另外提供一個特殊環境拿取正確IP的CODE，適用AWS ELB：


來源：http://blog.chinaunix.net/u/21041/showart_338744.html]]></description>
      <category>PHP 教學</category>
      <author>死神</author>
      <pubDate>Fri, 02 May 2014 03:46:32 +0000</pubDate>
    </item>
  </channel>
</rss>