<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>TShopping - PHP</title>
    <link>https://www.tshopping.com.tw/forum-276-1.html</link>
    <description>Latest 20 threads of PHP</description>
    <copyright>Copyright(C) TShopping</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Mon, 25 May 2026 09:58:02 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>https://www.tshopping.com.tw/static/image/common/logo_88_31.gif</url>
      <title>TShopping</title>
      <link>https://www.tshopping.com.tw/</link>
    </image>
    <item>
      <title>php array_intersect_key 用法</title>
      <link>https://www.tshopping.com.tw/thread-265164-1-1.html</link>
      <description><![CDATA[假設URL為

一般用$_GET來獲取變數
可以直接擷取整段作為陣列變數
使用 array_intersect_key 指令，就可直接獲取陣列


範例
使用 PHP 的 array_intersect_key() 函数配合 $_GET 是过滤用户输入的有效方法，它仅保留存在于白名单数组中的键名及其对应值。常用于仅允许特 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Tue, 17 Mar 2026 13:44:20 +0000</pubDate>
    </item>
    <item>
      <title>網站帖子亂數抓取相關文章CODE</title>
      <link>https://www.tshopping.com.tw/thread-265118-1-1.html</link>
      <description><![CDATA[網址：https://pipe.netyea.com/state-1113.html

展示圖:





文章來源：NetYea 網頁設計]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Mon, 01 Dec 2025 15:25:20 +0000</pubDate>
    </item>
    <item>
      <title>PHP 8.2 CKeditor 4.11 網頁編輯器與CKfinder 3.7 上傳問題</title>
      <link>https://www.tshopping.com.tw/thread-264898-1-1.html</link>
      <description><![CDATA[設定請看此篇
CKeditor 4.4.5 網頁編輯器與CKfinder 2.4 上傳整合應用


剛安裝好的時候，出現錯誤訊息

請修改 /etc/php.ini

改成


如果是Cpanel 的 easyApache 4因為有很多PHP版本，所以先在該網站下放入 phpinfo();
找出相對版本，我以php8.2為例
找到
vi /opt/cpa ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Wed, 08 Jan 2025 06:08:33 +0000</pubDate>
    </item>
    <item>
      <title>php8.X 使用foreach批次大量接收 post 變數的方法</title>
      <link>https://www.tshopping.com.tw/thread-264891-1-1.html</link>
      <description><![CDATA[PHP8.0之後each()被棄用，原本使用each都會出現以下錯誤Error: Call to undefined function each() 解決方法就是用foreach替換each，且foreach效能比each快10倍以上，是個不錯的替換方案

替換方法如下說明：

只需要把原本each的變數替換到foreach ，其他程式都不需要 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Mon, 30 Dec 2024 08:46:58 +0000</pubDate>
    </item>
    <item>
      <title>PHP 8 mysqli 常用的函數 insert_id</title>
      <link>https://www.tshopping.com.tw/thread-264888-1-1.html</link>
      <description><![CDATA[[*]建立資料庫連線
$mysqli = new mysqli($db_host, $db_user, $db_password, $db_name); 
[*]設定語系
$mysqli-&gt;set_charset(\&quot;utf8\&quot;); 
[*]執行SQL指令
$mysqli-&gt;query(\&quot;insert into,update delete\&quot;);//新增、更新、刪除
[*]影響筆數
$mysqli-&gt;affected_rows;
[*]取得 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Wed, 25 Dec 2024 14:02:23 +0000</pubDate>
    </item>
    <item>
      <title>CPanel 從CentOS 7.9 升級到AlamLinux 9 PHP 8.X 無法使用session</title>
      <link>https://www.tshopping.com.tw/thread-264885-1-1.html</link>
      <description><![CDATA[升級以後


修改


都沒辦法使用session，範例如下
https://www.php.net/manual/en/function.session-start.php


找了CPANEL文章也沒用
查找.htaccess檔案也無發現
到CPANEL該檔案管理員，public_html目錄下
發現了user.ini檔案

修改
原來是存檔路徑問題
搞定

文章出 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Tue, 24 Dec 2024 07:45:39 +0000</pubDate>
    </item>
    <item>
      <title>PHP 8 function_exists 不起作用，並回傳 false</title>
      <link>https://www.tshopping.com.tw/thread-264883-1-1.html</link>
      <description><![CDATA[CPANEL 從 CENTOS 7.9 升級成 AlamLinux 9時


代碼如下：

修改成就能正常執行了


參考文章
https://stackoverflow.com/questions/38382968/php-function-exists-not-working-and-returning-false]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Mon, 23 Dec 2024 14:08:22 +0000</pubDate>
    </item>
    <item>
      <title>PHP 8+MariaDB支援(construct)建構子？CPANEL CentOS 7.9 升級 AlamLinux 9</title>
      <link>https://www.tshopping.com.tw/thread-264882-1-1.html</link>
      <description><![CDATA[我有一個PHP 7(cpanel centos 7.9)專案正在遷移到 PHP 版本 8(alamlinux 9)，但 PHP 8版本不支援舊的寫法如果使用建構函式名稱? 搞了構造函數  __construcotr 不少時間

範例如下:




需注意這段
ALL_PS 必須加 單引號或雙引號 \&quot;\&quot;

及這段


$row1[\'col1\'] 
col裡面也 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Mon, 23 Dec 2024 13:32:26 +0000</pubDate>
    </item>
    <item>
      <title>PHP7 運行出現Notice : Use of undefined constant 的解決方法</title>
      <link>https://www.tshopping.com.tw/thread-264696-1-1.html</link>
      <description><![CDATA[問題：
問題描述;       進入網站會出現大量類似下面的提示，但是可以正常顯示和運行.最大的問題是LOG檔案占空間，沒多久就數十GB答案        這些是 PHP 的提示而非報錯，PHP 本身不需要事先宣告變數即可直接使用，但對未宣告變數會有提示。一般作為正式的網站會把提示 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Fri, 06 Oct 2023 09:29:18 +0000</pubDate>
    </item>
    <item>
      <title>使用PhpSpreadsheet將Excel匯入的MySQL資料庫</title>
      <link>https://www.tshopping.com.tw/thread-264576-1-1.html</link>
      <description><![CDATA[日常開發中，我們經常遇到這樣的場景，需要將一個Excel表格資料如客戶資訊匯入到系統資料庫中，然後在系統中進行進一步操作，如給匯入的客戶群發短信。

PHP匯入Excel避免了人工錄入資訊的麻煩和出錯，提高效率。

給大家講解使用PhpSpreadsheet將Excel匯入的MySQL資料 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Mon, 15 May 2023 14:58:25 +0000</pubDate>
    </item>
    <item>
      <title>PHP 7.4 如何使用 PhpSpreadsheet 製作輸出 EXCEL 檔案</title>
      <link>https://www.tshopping.com.tw/thread-264574-1-1.html</link>
      <description><![CDATA[需要安裝COMPOSER，可參考下面文章
如何在 CentOS 8 上安裝和使用 PHP Composer


演示圖：




PhpSpreadsheet 是一個用純 PHP 編寫的庫，它提供了一組允許您讀取和寫入各種電子表格文件格式（如 Excel 和 LibreOffice Calc）的類。

支持的文件格式[/tr]










[/ ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Fri, 12 May 2023 14:43:41 +0000</pubDate>
    </item>
    <item>
      <title>php – namespace 命名空間教學介紹</title>
      <link>https://www.tshopping.com.tw/thread-264573-1-1.html</link>
      <description><![CDATA[很多個 函式(function) 可以使用 類別(class) 包裝起來；
很多個 類別(class) 可以使用 命名空間(namespace) 包裝起來。

命名空間，可以解決不同人使用同樣名稱的類別，所造成的衝突。例如小明寫了一支取名hello的類別；小華也寫了一支取名hello的類別，一旦同時載入 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Fri, 12 May 2023 13:48:25 +0000</pubDate>
    </item>
    <item>
      <title>PHP 7 pageft函數重複宣告問題? Cannot redeclare function previously de...</title>
      <link>https://www.tshopping.com.tw/thread-264572-1-1.html</link>
      <description><![CDATA[在使用pageft分頁時發現無法正常秀出PHP5正常 到PHP7就出錯
查了LOG檔後
發現重復宣告了兩次
抓掉引入的另一次就可以了]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Wed, 10 May 2023 10:34:35 +0000</pubDate>
    </item>
    <item>
      <title>帶排序功能的js masonry瀑布流插件</title>
      <link>https://www.tshopping.com.tw/thread-264368-1-1.html</link>
      <description><![CDATA[查看演示  下載檔案


簡要教程
sortableJs是一款帶排序功能的js masonry瀑布流插件。sortableJs能夠使元素以卡片形式顯示，並以masonry瀑布流方式進行佈局，通過點擊分類按鈕，可以將卡片按指定的方式動態排序。

使用方法
在頁面中引入sortable.min.css和sortable.m ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Fri, 06 Jan 2023 14:05:30 +0000</pubDate>
    </item>
    <item>
      <title>port_scanner.php</title>
      <link>https://www.tshopping.com.tw/thread-264203-1-1.html</link>
      <description><![CDATA[文章出處
https://gist.github.com/akalongman/b50bc11a9303adb6f2db]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Mon, 04 Apr 2022 15:15:05 +0000</pubDate>
    </item>
    <item>
      <title>ubuntu LINUX 排程 及 回報</title>
      <link>https://www.tshopping.com.tw/thread-264195-1-1.html</link>
      <description><![CDATA[進入SUDO後



VMx改成你的主機暱稱


存檔離開

讓檔案可以執行


排程
寫入

加入環境變數
每十分鐘回報一次]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Tue, 29 Mar 2022 07:42:25 +0000</pubDate>
    </item>
    <item>
      <title>Ckeditor Ckfinder https 無法瀏覽伺服器及上傳問題</title>
      <link>https://www.tshopping.com.tw/thread-264185-1-1.html</link>
      <description><![CDATA[今日把http轉成https


到後台編輯時發現無法瀏覽伺服器及上傳圖片





到ckeditor目錄下，找到config.js
改成
到ckfinder目錄下，找到config.php
改成


就能正常使用了


文章出處]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Sun, 13 Mar 2022 13:32:00 +0000</pubDate>
    </item>
    <item>
      <title>CPanel 用Transfer TOOL轉移資料後，PHP56-PHP74 cookies無法使用</title>
      <link>https://www.tshopping.com.tw/thread-263981-1-1.html</link>
      <description><![CDATA[CPanel 用Transfer TOOL轉移資料後，PHP56-PHP74 cookies無法使用
使用購物車時發現COOKIE無法帶入
找到PHP.INI 改

或是 php.ini, .user.ini 增加]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Thu, 16 Dec 2021 15:06:59 +0000</pubDate>
    </item>
    <item>
      <title>CPanel 服務器用transfer Tool對拷主機, 有些網站顯示error 500</title>
      <link>https://www.tshopping.com.tw/thread-263980-1-1.html</link>
      <description><![CDATA[這兩天用CPanel 服務器用transfer Tool對拷主機


發現有的網站居然顯示 內部錯誤 ERROR 500





找了一下.htaccess檔案內多了
把他註解掉就可以了]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Thu, 16 Dec 2021 14:24:55 +0000</pubDate>
    </item>
    <item>
      <title>Google reCAPTCHA V2 機器人驗證 教學 PHP範例</title>
      <link>https://www.tshopping.com.tw/thread-263909-1-1.html</link>
      <description><![CDATA[如果已經註冊過，想查詢自己的公私鑰:
https://www.google.com/recaptcha/admin#list
還沒註冊過的，下面三步驟建立Google reCAPTCHA~

STEP I前往 Google機器人官網，點選右上的 「Admin console」按鈕。

STEP II填入名稱、選擇驗證類型、網域、管理者，同意Google蒐 ...]]></description>
      <category>PHP</category>
      <author>woff</author>
      <pubDate>Sun, 07 Nov 2021 14:10:38 +0000</pubDate>
    </item>
  </channel>
</rss>