<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Shawnhy</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Shawnhy"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Shawnhy"/>
	<updated>2026-09-29T07:53:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/5/zh-tw&amp;diff=1033667</id>
		<title>Translations:Joomla 3.x to 4.x Step by Step Migration/5/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/5/zh-tw&amp;diff=1033667"/>
		<updated>2025-01-07T01:14:04Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;== Step by Step == === Set Up a Development Location ===&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Step by Step ==&lt;br /&gt;
=== Set Up a Development Location ===&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033666</id>
		<title>Joomla 3.x to 4.x Step by Step Migration/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033666"/>
		<updated>2025-01-07T01:14:01Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;&amp;lt;/br&amp;gt;這是Joomla!的核心擴展：  * 類別 * 文章 * 選單 * 模組（核心模組 - 不包括第三方模組） * 操作日誌 * 橫幅廣告 * 欄位 * 內容歷史 *...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{version|3.10,4.x}}&lt;br /&gt;
{{warning|title=警告！|本指南假設您從 Joomla 3.10.x 開始。如果您使用的是早期版本，請務必先升級到 Joomla 3.10，然後再升級到 Joomla 4。 &lt;br /&gt;
&lt;br /&gt;
無需急於一時。請確保所有擴充套件都已準備好支援 Joomla 4.x。Joomla 3.10.x 將支援至 2023 年 8 月 16 日。}}&lt;br /&gt;
&lt;br /&gt;
本文將一步步的將你的 Joomla 3.10 網站遷移到 4.x。由於實際的應用情境可能有數百種，我們將給你一個最基本的流程可以遵循。大量的第三方擴充套件可能會造成較為複雜的遷移流程，建議你可以聯絡第三方套件的作者詢問相關建議來幫助您遷移這些套件至最新版本。&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
從 Joomla! 3.10.x 遷移到 4.x 被視為一次小規模遷移。這是因為 Joomla 核心擴展將通過 Joomla! 後台 (管理員) 中的「更新」元件進行「一鍵式」升級。許多第三方擴展也支持一鍵式升級。有些則不支持。請逐一檢查每個擴展，並確定從 3.10 到 4.x 的升級路徑。如果您還沒有閱讀，請先閱讀 [[S:MyLanguage/Migration Step by Step Self Assessment|自我評估]] 和 [[S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|規劃 3.10 到 4.x 遷移]]，然後再按照以下步驟操作。&lt;br /&gt;
&amp;lt;/br&amp;gt;這是Joomla!的核心擴展：&lt;br /&gt;
&lt;br /&gt;
* 類別&lt;br /&gt;
* 文章&lt;br /&gt;
* 選單&lt;br /&gt;
* 模組（核心模組 - 不包括第三方模組）&lt;br /&gt;
* 操作日誌&lt;br /&gt;
* 橫幅廣告&lt;br /&gt;
* 欄位&lt;br /&gt;
* 內容歷史&lt;br /&gt;
* 聯絡人&lt;br /&gt;
* 訊息&lt;br /&gt;
* 新聞來源&lt;br /&gt;
* 重新導向&lt;br /&gt;
* 搜尋（在 4.x 版本中解耦。現有的 3.x 站點仍會遷移它。但是我們建議使用智能搜尋。請參閱「評估每個擴展」下的說明）&lt;br /&gt;
* 智能搜尋&lt;br /&gt;
* 標籤&lt;br /&gt;
* 網站連結（解耦，但您的網站可能正在使用它，並且它將遷移。請參閱「評估每個擴展」下的說明）&lt;br /&gt;
&lt;br /&gt;
== Step by Step ==&lt;br /&gt;
=== Set Up a Development Location ===&lt;br /&gt;
# Make sure you are running the latest Joomla 3.10.x version before proceeding.&lt;br /&gt;
# Take a backup of your live 3.10.x site. You can use a suggested tool (see the &#039;&#039;Suggested Tools&#039;&#039; at the bottom of page) or you can do this manually.&lt;br /&gt;
#*[[S:MyLanguage/Backup_Basics_for_a_Joomla!_Web_Site|Backup Basics for a Joomla! Web Site]]&lt;br /&gt;
#*[[S:MyLanguage/What_are_the_best_practices_for_site_backups%3F|What are the best practices for site backups?]]&lt;br /&gt;
# Make sure your environment meets the [https://downloads.joomla.org/technical-requirements technical requirements for Joomla 4].&lt;br /&gt;
# Create a new database and new user to restore your 3.10.x site to. &lt;br /&gt;
# Create a testing site or build area to work in and restore the backup copy of your 3.10.x site in one of the following places:&lt;br /&gt;
#* A subdomain.&lt;br /&gt;
#* A subdirectory.&lt;br /&gt;
#* A local device. Joomla has a detailed tutorial on installing [https://sourceforge.net/projects/xampp/ XAMPP] at [[XAMPP]]. However [https://www.wampserver.com/en/ WAMP], [https://www.mamp.info/en/windows/ MAMP], [https://sourceforge.net/projects/lampas/ LAMP] are all suitable alternatives.&lt;br /&gt;
#* A new hosting account on a temporary domain in the root. (If you would like to change hosts in the process of migration.)&lt;br /&gt;
#** Restoring a site on a local device. See [[S:MyLanguage/Installing Joomla locally|Installing Joomla locally]] and [[S:MyLanguage/Setting up your workstation for Joomla development|Setting up your workstation for Joomla development]].&lt;br /&gt;
#** Restoring a site with a tool listed at the bottom of the page. (Read the developer documentation.)&lt;br /&gt;
# In your test location, update your Joomla! 3.10.x instance to the latest maintenance release.&lt;br /&gt;
# Make sure you have the latest database schema updated to the latest version 3.10.x version by going to {{rarr|Extension Manager,Database}} tab. If your schema is not up to date as in the following image, click the &#039;&#039;&#039;Fix&#039;&#039;&#039; button:{{-}}[[File:J310-admin-extension-database-fix-en.png|border|800px]]&lt;br /&gt;
# Empty trash: Do you have any articles in the trash? Delete them (and any associated media if not in use elsewhere on the site). Articles (categories and menu items too) left in the trash can cause migration issues.&lt;br /&gt;
# Test.&lt;br /&gt;
# Backup again.&lt;br /&gt;
&lt;br /&gt;
=== Assess Each Extension ===&lt;br /&gt;
In your [[S:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x|planning]], you determined that third-party extensions were staying or going and how they migrate. For this portion of the Step by Step, you’ll be using two different sections of the site extensively; The Pre-Update Check in {{rarr|Components,Joomla! Update}} and {{rarr|Extensions,Manage,Manage}}. You are going to be looking at every single extension installed on your site. You will be determining if they need to be updated to the latest version or uninstalled. More details in [[Special:MyLanguage/:Pre-Update_Check|Pre-Update Check]].&lt;br /&gt;
# Using the &#039;&#039;&#039;Pre-Update Check&#039;&#039;&#039;: in order to use the Pre-Update Check, you will need to set the Joomla! Update component to Joomla 4. To do this follow:&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version (must be 3.10.x) and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:Migration_J3toJ4_update_channel-en.png|border|800px]]{{-}}&lt;br /&gt;
# Click Save &amp;amp; Close&lt;br /&gt;
# You will then see your Installed Joomla Version, the latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-admin-update_to_4-pre_update_check-en.png|border|800px]]{{amboxNew|image=notice|style=notice|title={{{title|Important Notice}}}|text=&#039;&#039;&#039;Do NOT update to Joomla! 4 right now. This is only to prepare your third-party extensions and get the site compatible with Joomla! 4.&#039;&#039;&#039;}}&lt;br /&gt;
# Look at the Pre-Update Check and the Extension Pre-Update Check in the Pre-Update Check tab of the Joomla Update component. If any extension that isn’t in your planning is listed here, add it to your list of extensions to investigate.&lt;br /&gt;
# If you migrated from Joomla! 2.5 to 3.x in the past, there may be some leftover extensions that need to be cleaned up. The following are older 2.5 or 3.x extensions that need to be uninstalled before updating to Joomla 4:&lt;br /&gt;
#;* plg_content_geshi&lt;br /&gt;
#;* PKG_JOOMLA &lt;br /&gt;
#;* Bluestork Administrator Template&lt;br /&gt;
#;* Beez_20&lt;br /&gt;
#;* Beez5&lt;br /&gt;
#;* Atomic&lt;br /&gt;
## When it comes to templates, uninstall all core Frontend or Backend templates except Protostar and Beez3 (site templates) and Isis or Hathor (Administrator templates). &#039;&#039;&#039;Note&#039;&#039;&#039; Protostar is &#039;&#039;&#039;not&#039;&#039;&#039; compatible with Joomla 4. Upon migration it will disappear. You&#039;ll need to have one template selected as &amp;quot;default&amp;quot; and you can use Protostar or Beez3. Protostar will disappear upon migration to Joomla 4.x.&lt;br /&gt;
## If you come across other files that need to be uninstalled, please add them to this page. This is a wiki so anyone can add to the page. Thank you in advance for your service.&lt;br /&gt;
# You will notice the tags for whether an extension is compatible or not. These tags generally tell a true story if they say No or Yes. If they say “Missing Compatibility Tag” it means that the extension developer didn’t use a tag in their extension so we don’t know if it is or isn’t compatible with Joomla 4. Talk to the developer to verify.&lt;br /&gt;
# &#039;&#039;&#039;Update Extensions&#039;&#039;&#039;: update any extensions that you will keep in your website. In Joomla! 3.10.x you can go to {{rarr|Extension Manager,Update tab}} and click &#039;&#039;&#039;Find Updates&#039;&#039;&#039; that will add a tooltip in the Version column, under the Manage tab, giving some compatibility information from the Backend. This functionality only supports extensions that update via the Extension Manager Update tab. If you have extensions installed that do not use the Joomla extension update they need to be assessed manually as detailed below. The same goes for those extensions that have a tooltip. You will still need to check the type of package and migration path with the extension developer to verify how to upgrade/migrate.&lt;br /&gt;
# Investigate and Uninstall Extensions Extensions: go to {{rarr|Extension Manager,Manage}}&lt;br /&gt;
# Click the Button &#039;&#039;Search Tools&#039;&#039; to show the filter options&lt;br /&gt;
# Select Package from the &#039;&#039;Select Type&#039;&#039; drop-down.{{-}}[[File:J310-admin-extension-manage-package-en.png|800px]]{{-}}{{note|Selecting Package first is recommended because if there is something you need to uninstall in a package, it will automatically uninstall the associated Modules, Plugins, or anything else in the package at one time.}}&lt;br /&gt;
# Uninstall any Packages that are no longer needed or will not be migrating to Joomla 4.&lt;br /&gt;
# Repeat this process of going through the Manage tab for all Types in the drop-down: Component, File, Language, Library, Module, Plugin and Template. If the Author states Joomla! Project, then leave those extensions alone. For all others, make sure that you uninstall those not in use or not compatible with Joomla!&amp;amp;nbsp;4.x.{{-}}{{note|&#039;&#039;&#039;NOTE!&#039;&#039;&#039; You will not be able to uninstall any template that is set as default. Select a Core supported template such as Beez3 or Protostar and then uninstall the template if you need to do so. &amp;lt;br /&amp;gt;&#039;&#039;Another reminder:&#039;&#039; &#039;&#039;&#039;Protostar is not compatible with Joomla 4.x&#039;&#039;&#039;. Upon migration it will disappear. Selecting it as default simply gets you to Joomla 4.x.|type=serious}}&lt;br /&gt;
# Make a note of any versions of Packages and Components currently running that you will be keeping on your site. You can copy/paste them into a document for reference.&lt;br /&gt;
# For any extensions you are keeping but don&#039;t use the Extension Manager to one-click update ({{rarr|Extensions,Manage,Update}}) update all extensions to the latest versions.&lt;br /&gt;
# Before and as you update, note if the extensions have both 3.10.x &amp;amp; 4.x versions in the same package. If so, they will be fine to &amp;quot;one-click update.&amp;quot; If not, and 3.10 and 4.x have different packages, look at them case by case. They will normally fall into one of the following scenarios:&lt;br /&gt;
#* The extension has separate packages but upon upgrading to 4.x, they automatically detect this and still work. Make sure the developer confirms this.&lt;br /&gt;
#* The extension has separate packages that need to be uninstalled in 3.10.x and then installed with the Joomla 4.x version once the site is migrated. An example of this might be a content plugin. It is simple to uninstall it in 3.10.x and then install it again in 4.x.&lt;br /&gt;
#* See [[S:MyLanguage/Template_Considerations_During_Migration|Template Considerations]] for more specific information on templates and [[S:MyLanguage/J3.x:Converting_A_Previous_Joomla!_Version_Template|Converting a previous Joomla! Version template]]&lt;br /&gt;
&lt;br /&gt;
==== Notes on Search (com_search) ====&lt;br /&gt;
Search (com_search) will be decoupled in Joomla 4.x. Search (com_search) will migrate to Joomla 4. After migration, you&#039;ll need to update it to the Joomla 4.x version via com_installer. It will continue to be maintained, but more the same way a third-party extension is by receiving updates via com_installer. It is recommended to use Smart Search (com_finder) going forward. Search will still be available at https://extensions.joomla.org/category/official-extensions/.&lt;br /&gt;
&lt;br /&gt;
==== Notes on Weblinks ====&lt;br /&gt;
Weblinks was decoupled back in Joomla 3.4. If it was in use on a 2.5 site, the migration process would note this and migrate the Weblinks component and data. For the migration from 3.10.x to 4.x, it will be the same. It is still available and maintained on the JED at [https://extensions.joomla.org/category/official-extensions/ Official Extensions].&lt;br /&gt;
&lt;br /&gt;
==== Notes on Legacy Routing ==== &lt;br /&gt;
Legacy routing will not be available in Joomla 4.x. Only Modern will be available. When you do the migration, if you are using Legacy routing, the system will automatically change them to Modern routing. You will want to run a broken link checker on your site after migrating to Joomla 4.x and &#039;&#039;before you go live&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Going to Joomla! 4.x ===&lt;br /&gt;
Once you have either updated or uninstalled your third-party extensions so that only those compatible with Joomla! 4 remain in your installation, continue with the following steps:&lt;br /&gt;
# Go to {{rarr|System,Global Configuration,Server tab}} and turn Error Reporting from System Default to Maximum. Make sure to Save &amp;amp; Close.{{-}} [[File:J310-system-global-config-server-tab-en.png|border|500px]]&lt;br /&gt;
# Take another backup.&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:J310-component-joomla-update-select-support-en.png|border|500px]]&lt;br /&gt;
# Click Save &amp;amp; Close.&lt;br /&gt;
# You will then see your Installed Joomla Version, the Latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-to-j4-dev-update-found-en.png|border|800px]]&lt;br /&gt;
# If the update is not showing up, go to {{rarr|Extensions,Update}} and select Clear Cache from the toolbar. Now the update to Joomla! 4 should show up.&lt;br /&gt;
# Cross your fingers, and make sure you have that backup available in case.&lt;br /&gt;
# Click the Install the Update button.&lt;br /&gt;
# Make tea whilst the status bar loads to fully green. The amount of time this takes is dependent on your site, internet connection and server speed. The process can take several minutes. There are over 12,000 files comprising 75 megabytes to be extracted. When the update is finished, you might be logged out of the Administrator. Sign in again, if necessary&lt;br /&gt;
# If all goes well, you will get to a totally new look to the Backend panel.{{-}}[[File:j4-administrator-overview-en.png|border|800px]]&lt;br /&gt;
# Go to {{rarr|System,Maintenance,Database}} and click &#039;&#039;Fix&#039;&#039; if any errors show.&lt;br /&gt;
# In {{rarr|System,Install,Discover}} see if there are any extensions to install. (There shouldn&#039;t be any!)&lt;br /&gt;
# Go to the Frontend of your site and see if it shows up even if it’s not the right template. If so, continue. If not, see [[S:MyLanguage/Joomla 3.10 to 4.x Common Migration Errors|common errors during migration]].&lt;br /&gt;
# Take a backup.&lt;br /&gt;
# Install your new template or other extensions if you have them to install. Back up often.&lt;br /&gt;
# Configure them. Back up often.&lt;br /&gt;
# Run a broken link checker and fix any broken links.&lt;br /&gt;
# Test everything. Back up often.&lt;br /&gt;
# If everything works as expected, turn Error Reporting back to System Default ({{rarr|System,Global Configuration,Server tab}}). Make sure to Save &amp;amp; Close.&lt;br /&gt;
# Be sure to read the post-installation messages.&lt;br /&gt;
=== Going Live with Your Joomla! 4.x Site ===&lt;br /&gt;
# When you’re ready to go live, back up your 3.10 site for the last time. Restore it in a subdirectory or subdomain if you would like to.&lt;br /&gt;
# Back up your Joomla! 4.x site and move or restore your Joomla! 4.x site to the root (or change nameservers if you were building on a temporary domain at a new hosting account root).&lt;br /&gt;
# Test again.&lt;br /&gt;
# &#039;&#039;&#039;If&#039;&#039;&#039; you have made security changes to &#039;&#039;.htaccess&#039;&#039; file in the past, you may need to change a line (or lines) in it to update to Joomla 4. Please go to [https://docs.joomla.org/Htaccess_changes_after_joomla4.0.4 Htaccess changes after joomla4.0.4] to determine if you need to change your file. &lt;br /&gt;
# Remove the Joomla! 3.10 site from the server within a couple of days unless you have edited your &#039;&#039;robots.txt&#039;&#039; file to block the search engine spiders and disabled the Frontend of the site.&lt;br /&gt;
# Remove all development sites you have been working with or keep them up-to-date if they are running a current version in order to ward off hack attempts on your server. &lt;br /&gt;
&lt;br /&gt;
If you had data change on the 3.10 site while you were migrating to 4.x, you will want to get that data moved over to the 4.x site before going live. You can do this manually (make sure you keep the same user IDs - go in order) or by using a [https://extensions.joomla.org/category/migration-a-conversion/data-import-a-export%20transfer%20tool/third-party%20extension/ third party extension].&lt;br /&gt;
&lt;br /&gt;
== Suggested Tools ==&lt;br /&gt;
* [http://extensions.joomla.org/extensions/access-a-security/site-security/backup/1606 Akeeba Backup] is popular for backup and restore. See more [https://extensions.joomla.org/tags/backup/ backup tools].&lt;br /&gt;
==Related information== &lt;br /&gt;
[[Special:MyLanguage/:Pre-Update_Check|Pre-Update_Check]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/4/zh-tw&amp;diff=1033665</id>
		<title>Translations:Joomla 3.x to 4.x Step by Step Migration/4/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/4/zh-tw&amp;diff=1033665"/>
		<updated>2025-01-07T01:13:54Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;&amp;lt;/br&amp;gt;這是Joomla!的核心擴展：  * 類別 * 文章 * 選單 * 模組（核心模組 - 不包括第三方模組） * 操作日誌 * 橫幅廣告 * 欄位 * 內容歷史 *...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;/br&amp;gt;這是Joomla!的核心擴展：&lt;br /&gt;
&lt;br /&gt;
* 類別&lt;br /&gt;
* 文章&lt;br /&gt;
* 選單&lt;br /&gt;
* 模組（核心模組 - 不包括第三方模組）&lt;br /&gt;
* 操作日誌&lt;br /&gt;
* 橫幅廣告&lt;br /&gt;
* 欄位&lt;br /&gt;
* 內容歷史&lt;br /&gt;
* 聯絡人&lt;br /&gt;
* 訊息&lt;br /&gt;
* 新聞來源&lt;br /&gt;
* 重新導向&lt;br /&gt;
* 搜尋（在 4.x 版本中解耦。現有的 3.x 站點仍會遷移它。但是我們建議使用智能搜尋。請參閱「評估每個擴展」下的說明）&lt;br /&gt;
* 智能搜尋&lt;br /&gt;
* 標籤&lt;br /&gt;
* 網站連結（解耦，但您的網站可能正在使用它，並且它將遷移。請參閱「評估每個擴展」下的說明）&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033664</id>
		<title>Joomla 3.x to 4.x Step by Step Migration/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033664"/>
		<updated>2025-01-07T01:13:06Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;== Intro == 從 Joomla! 3.10.x 遷移到 4.x 被視為一次小規模遷移。這是因為 Joomla 核心擴展將通過 Joomla! 後台 (管理員) 中的「更新」元件進...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{version|3.10,4.x}}&lt;br /&gt;
{{warning|title=警告！|本指南假設您從 Joomla 3.10.x 開始。如果您使用的是早期版本，請務必先升級到 Joomla 3.10，然後再升級到 Joomla 4。 &lt;br /&gt;
&lt;br /&gt;
無需急於一時。請確保所有擴充套件都已準備好支援 Joomla 4.x。Joomla 3.10.x 將支援至 2023 年 8 月 16 日。}}&lt;br /&gt;
&lt;br /&gt;
本文將一步步的將你的 Joomla 3.10 網站遷移到 4.x。由於實際的應用情境可能有數百種，我們將給你一個最基本的流程可以遵循。大量的第三方擴充套件可能會造成較為複雜的遷移流程，建議你可以聯絡第三方套件的作者詢問相關建議來幫助您遷移這些套件至最新版本。&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
從 Joomla! 3.10.x 遷移到 4.x 被視為一次小規模遷移。這是因為 Joomla 核心擴展將通過 Joomla! 後台 (管理員) 中的「更新」元件進行「一鍵式」升級。許多第三方擴展也支持一鍵式升級。有些則不支持。請逐一檢查每個擴展，並確定從 3.10 到 4.x 的升級路徑。如果您還沒有閱讀，請先閱讀 [[S:MyLanguage/Migration Step by Step Self Assessment|自我評估]] 和 [[S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|規劃 3.10 到 4.x 遷移]]，然後再按照以下步驟操作。&lt;br /&gt;
&amp;lt;/br&amp;gt;Joomla! Core Extensions are:&lt;br /&gt;
* Categories&lt;br /&gt;
* Articles&lt;br /&gt;
* Menus&lt;br /&gt;
* Modules (core modules - not third-party)&lt;br /&gt;
* Action Logs&lt;br /&gt;
* Banners&lt;br /&gt;
* Fields&lt;br /&gt;
* Content History&lt;br /&gt;
* Contacts&lt;br /&gt;
* Messaging&lt;br /&gt;
* Newsfeeds&lt;br /&gt;
* Redirect&lt;br /&gt;
* Search (decoupled in 4.x. Existing 3.x sites will still migrate it. However we recommend using Smart Search going forward. See Notes under Assess Each Extension)&lt;br /&gt;
* Smart Search&lt;br /&gt;
* Tags&lt;br /&gt;
* Weblinks (decoupled but your site may be using it and it will migrate. See Notes under Assess Each Extension.)&lt;br /&gt;
&lt;br /&gt;
== Step by Step ==&lt;br /&gt;
=== Set Up a Development Location ===&lt;br /&gt;
# Make sure you are running the latest Joomla 3.10.x version before proceeding.&lt;br /&gt;
# Take a backup of your live 3.10.x site. You can use a suggested tool (see the &#039;&#039;Suggested Tools&#039;&#039; at the bottom of page) or you can do this manually.&lt;br /&gt;
#*[[S:MyLanguage/Backup_Basics_for_a_Joomla!_Web_Site|Backup Basics for a Joomla! Web Site]]&lt;br /&gt;
#*[[S:MyLanguage/What_are_the_best_practices_for_site_backups%3F|What are the best practices for site backups?]]&lt;br /&gt;
# Make sure your environment meets the [https://downloads.joomla.org/technical-requirements technical requirements for Joomla 4].&lt;br /&gt;
# Create a new database and new user to restore your 3.10.x site to. &lt;br /&gt;
# Create a testing site or build area to work in and restore the backup copy of your 3.10.x site in one of the following places:&lt;br /&gt;
#* A subdomain.&lt;br /&gt;
#* A subdirectory.&lt;br /&gt;
#* A local device. Joomla has a detailed tutorial on installing [https://sourceforge.net/projects/xampp/ XAMPP] at [[XAMPP]]. However [https://www.wampserver.com/en/ WAMP], [https://www.mamp.info/en/windows/ MAMP], [https://sourceforge.net/projects/lampas/ LAMP] are all suitable alternatives.&lt;br /&gt;
#* A new hosting account on a temporary domain in the root. (If you would like to change hosts in the process of migration.)&lt;br /&gt;
#** Restoring a site on a local device. See [[S:MyLanguage/Installing Joomla locally|Installing Joomla locally]] and [[S:MyLanguage/Setting up your workstation for Joomla development|Setting up your workstation for Joomla development]].&lt;br /&gt;
#** Restoring a site with a tool listed at the bottom of the page. (Read the developer documentation.)&lt;br /&gt;
# In your test location, update your Joomla! 3.10.x instance to the latest maintenance release.&lt;br /&gt;
# Make sure you have the latest database schema updated to the latest version 3.10.x version by going to {{rarr|Extension Manager,Database}} tab. If your schema is not up to date as in the following image, click the &#039;&#039;&#039;Fix&#039;&#039;&#039; button:{{-}}[[File:J310-admin-extension-database-fix-en.png|border|800px]]&lt;br /&gt;
# Empty trash: Do you have any articles in the trash? Delete them (and any associated media if not in use elsewhere on the site). Articles (categories and menu items too) left in the trash can cause migration issues.&lt;br /&gt;
# Test.&lt;br /&gt;
# Backup again.&lt;br /&gt;
&lt;br /&gt;
=== Assess Each Extension ===&lt;br /&gt;
In your [[S:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x|planning]], you determined that third-party extensions were staying or going and how they migrate. For this portion of the Step by Step, you’ll be using two different sections of the site extensively; The Pre-Update Check in {{rarr|Components,Joomla! Update}} and {{rarr|Extensions,Manage,Manage}}. You are going to be looking at every single extension installed on your site. You will be determining if they need to be updated to the latest version or uninstalled. More details in [[Special:MyLanguage/:Pre-Update_Check|Pre-Update Check]].&lt;br /&gt;
# Using the &#039;&#039;&#039;Pre-Update Check&#039;&#039;&#039;: in order to use the Pre-Update Check, you will need to set the Joomla! Update component to Joomla 4. To do this follow:&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version (must be 3.10.x) and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:Migration_J3toJ4_update_channel-en.png|border|800px]]{{-}}&lt;br /&gt;
# Click Save &amp;amp; Close&lt;br /&gt;
# You will then see your Installed Joomla Version, the latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-admin-update_to_4-pre_update_check-en.png|border|800px]]{{amboxNew|image=notice|style=notice|title={{{title|Important Notice}}}|text=&#039;&#039;&#039;Do NOT update to Joomla! 4 right now. This is only to prepare your third-party extensions and get the site compatible with Joomla! 4.&#039;&#039;&#039;}}&lt;br /&gt;
# Look at the Pre-Update Check and the Extension Pre-Update Check in the Pre-Update Check tab of the Joomla Update component. If any extension that isn’t in your planning is listed here, add it to your list of extensions to investigate.&lt;br /&gt;
# If you migrated from Joomla! 2.5 to 3.x in the past, there may be some leftover extensions that need to be cleaned up. The following are older 2.5 or 3.x extensions that need to be uninstalled before updating to Joomla 4:&lt;br /&gt;
#;* plg_content_geshi&lt;br /&gt;
#;* PKG_JOOMLA &lt;br /&gt;
#;* Bluestork Administrator Template&lt;br /&gt;
#;* Beez_20&lt;br /&gt;
#;* Beez5&lt;br /&gt;
#;* Atomic&lt;br /&gt;
## When it comes to templates, uninstall all core Frontend or Backend templates except Protostar and Beez3 (site templates) and Isis or Hathor (Administrator templates). &#039;&#039;&#039;Note&#039;&#039;&#039; Protostar is &#039;&#039;&#039;not&#039;&#039;&#039; compatible with Joomla 4. Upon migration it will disappear. You&#039;ll need to have one template selected as &amp;quot;default&amp;quot; and you can use Protostar or Beez3. Protostar will disappear upon migration to Joomla 4.x.&lt;br /&gt;
## If you come across other files that need to be uninstalled, please add them to this page. This is a wiki so anyone can add to the page. Thank you in advance for your service.&lt;br /&gt;
# You will notice the tags for whether an extension is compatible or not. These tags generally tell a true story if they say No or Yes. If they say “Missing Compatibility Tag” it means that the extension developer didn’t use a tag in their extension so we don’t know if it is or isn’t compatible with Joomla 4. Talk to the developer to verify.&lt;br /&gt;
# &#039;&#039;&#039;Update Extensions&#039;&#039;&#039;: update any extensions that you will keep in your website. In Joomla! 3.10.x you can go to {{rarr|Extension Manager,Update tab}} and click &#039;&#039;&#039;Find Updates&#039;&#039;&#039; that will add a tooltip in the Version column, under the Manage tab, giving some compatibility information from the Backend. This functionality only supports extensions that update via the Extension Manager Update tab. If you have extensions installed that do not use the Joomla extension update they need to be assessed manually as detailed below. The same goes for those extensions that have a tooltip. You will still need to check the type of package and migration path with the extension developer to verify how to upgrade/migrate.&lt;br /&gt;
# Investigate and Uninstall Extensions Extensions: go to {{rarr|Extension Manager,Manage}}&lt;br /&gt;
# Click the Button &#039;&#039;Search Tools&#039;&#039; to show the filter options&lt;br /&gt;
# Select Package from the &#039;&#039;Select Type&#039;&#039; drop-down.{{-}}[[File:J310-admin-extension-manage-package-en.png|800px]]{{-}}{{note|Selecting Package first is recommended because if there is something you need to uninstall in a package, it will automatically uninstall the associated Modules, Plugins, or anything else in the package at one time.}}&lt;br /&gt;
# Uninstall any Packages that are no longer needed or will not be migrating to Joomla 4.&lt;br /&gt;
# Repeat this process of going through the Manage tab for all Types in the drop-down: Component, File, Language, Library, Module, Plugin and Template. If the Author states Joomla! Project, then leave those extensions alone. For all others, make sure that you uninstall those not in use or not compatible with Joomla!&amp;amp;nbsp;4.x.{{-}}{{note|&#039;&#039;&#039;NOTE!&#039;&#039;&#039; You will not be able to uninstall any template that is set as default. Select a Core supported template such as Beez3 or Protostar and then uninstall the template if you need to do so. &amp;lt;br /&amp;gt;&#039;&#039;Another reminder:&#039;&#039; &#039;&#039;&#039;Protostar is not compatible with Joomla 4.x&#039;&#039;&#039;. Upon migration it will disappear. Selecting it as default simply gets you to Joomla 4.x.|type=serious}}&lt;br /&gt;
# Make a note of any versions of Packages and Components currently running that you will be keeping on your site. You can copy/paste them into a document for reference.&lt;br /&gt;
# For any extensions you are keeping but don&#039;t use the Extension Manager to one-click update ({{rarr|Extensions,Manage,Update}}) update all extensions to the latest versions.&lt;br /&gt;
# Before and as you update, note if the extensions have both 3.10.x &amp;amp; 4.x versions in the same package. If so, they will be fine to &amp;quot;one-click update.&amp;quot; If not, and 3.10 and 4.x have different packages, look at them case by case. They will normally fall into one of the following scenarios:&lt;br /&gt;
#* The extension has separate packages but upon upgrading to 4.x, they automatically detect this and still work. Make sure the developer confirms this.&lt;br /&gt;
#* The extension has separate packages that need to be uninstalled in 3.10.x and then installed with the Joomla 4.x version once the site is migrated. An example of this might be a content plugin. It is simple to uninstall it in 3.10.x and then install it again in 4.x.&lt;br /&gt;
#* See [[S:MyLanguage/Template_Considerations_During_Migration|Template Considerations]] for more specific information on templates and [[S:MyLanguage/J3.x:Converting_A_Previous_Joomla!_Version_Template|Converting a previous Joomla! Version template]]&lt;br /&gt;
&lt;br /&gt;
==== Notes on Search (com_search) ====&lt;br /&gt;
Search (com_search) will be decoupled in Joomla 4.x. Search (com_search) will migrate to Joomla 4. After migration, you&#039;ll need to update it to the Joomla 4.x version via com_installer. It will continue to be maintained, but more the same way a third-party extension is by receiving updates via com_installer. It is recommended to use Smart Search (com_finder) going forward. Search will still be available at https://extensions.joomla.org/category/official-extensions/.&lt;br /&gt;
&lt;br /&gt;
==== Notes on Weblinks ====&lt;br /&gt;
Weblinks was decoupled back in Joomla 3.4. If it was in use on a 2.5 site, the migration process would note this and migrate the Weblinks component and data. For the migration from 3.10.x to 4.x, it will be the same. It is still available and maintained on the JED at [https://extensions.joomla.org/category/official-extensions/ Official Extensions].&lt;br /&gt;
&lt;br /&gt;
==== Notes on Legacy Routing ==== &lt;br /&gt;
Legacy routing will not be available in Joomla 4.x. Only Modern will be available. When you do the migration, if you are using Legacy routing, the system will automatically change them to Modern routing. You will want to run a broken link checker on your site after migrating to Joomla 4.x and &#039;&#039;before you go live&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Going to Joomla! 4.x ===&lt;br /&gt;
Once you have either updated or uninstalled your third-party extensions so that only those compatible with Joomla! 4 remain in your installation, continue with the following steps:&lt;br /&gt;
# Go to {{rarr|System,Global Configuration,Server tab}} and turn Error Reporting from System Default to Maximum. Make sure to Save &amp;amp; Close.{{-}} [[File:J310-system-global-config-server-tab-en.png|border|500px]]&lt;br /&gt;
# Take another backup.&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:J310-component-joomla-update-select-support-en.png|border|500px]]&lt;br /&gt;
# Click Save &amp;amp; Close.&lt;br /&gt;
# You will then see your Installed Joomla Version, the Latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-to-j4-dev-update-found-en.png|border|800px]]&lt;br /&gt;
# If the update is not showing up, go to {{rarr|Extensions,Update}} and select Clear Cache from the toolbar. Now the update to Joomla! 4 should show up.&lt;br /&gt;
# Cross your fingers, and make sure you have that backup available in case.&lt;br /&gt;
# Click the Install the Update button.&lt;br /&gt;
# Make tea whilst the status bar loads to fully green. The amount of time this takes is dependent on your site, internet connection and server speed. The process can take several minutes. There are over 12,000 files comprising 75 megabytes to be extracted. When the update is finished, you might be logged out of the Administrator. Sign in again, if necessary&lt;br /&gt;
# If all goes well, you will get to a totally new look to the Backend panel.{{-}}[[File:j4-administrator-overview-en.png|border|800px]]&lt;br /&gt;
# Go to {{rarr|System,Maintenance,Database}} and click &#039;&#039;Fix&#039;&#039; if any errors show.&lt;br /&gt;
# In {{rarr|System,Install,Discover}} see if there are any extensions to install. (There shouldn&#039;t be any!)&lt;br /&gt;
# Go to the Frontend of your site and see if it shows up even if it’s not the right template. If so, continue. If not, see [[S:MyLanguage/Joomla 3.10 to 4.x Common Migration Errors|common errors during migration]].&lt;br /&gt;
# Take a backup.&lt;br /&gt;
# Install your new template or other extensions if you have them to install. Back up often.&lt;br /&gt;
# Configure them. Back up often.&lt;br /&gt;
# Run a broken link checker and fix any broken links.&lt;br /&gt;
# Test everything. Back up often.&lt;br /&gt;
# If everything works as expected, turn Error Reporting back to System Default ({{rarr|System,Global Configuration,Server tab}}). Make sure to Save &amp;amp; Close.&lt;br /&gt;
# Be sure to read the post-installation messages.&lt;br /&gt;
=== Going Live with Your Joomla! 4.x Site ===&lt;br /&gt;
# When you’re ready to go live, back up your 3.10 site for the last time. Restore it in a subdirectory or subdomain if you would like to.&lt;br /&gt;
# Back up your Joomla! 4.x site and move or restore your Joomla! 4.x site to the root (or change nameservers if you were building on a temporary domain at a new hosting account root).&lt;br /&gt;
# Test again.&lt;br /&gt;
# &#039;&#039;&#039;If&#039;&#039;&#039; you have made security changes to &#039;&#039;.htaccess&#039;&#039; file in the past, you may need to change a line (or lines) in it to update to Joomla 4. Please go to [https://docs.joomla.org/Htaccess_changes_after_joomla4.0.4 Htaccess changes after joomla4.0.4] to determine if you need to change your file. &lt;br /&gt;
# Remove the Joomla! 3.10 site from the server within a couple of days unless you have edited your &#039;&#039;robots.txt&#039;&#039; file to block the search engine spiders and disabled the Frontend of the site.&lt;br /&gt;
# Remove all development sites you have been working with or keep them up-to-date if they are running a current version in order to ward off hack attempts on your server. &lt;br /&gt;
&lt;br /&gt;
If you had data change on the 3.10 site while you were migrating to 4.x, you will want to get that data moved over to the 4.x site before going live. You can do this manually (make sure you keep the same user IDs - go in order) or by using a [https://extensions.joomla.org/category/migration-a-conversion/data-import-a-export%20transfer%20tool/third-party%20extension/ third party extension].&lt;br /&gt;
&lt;br /&gt;
== Suggested Tools ==&lt;br /&gt;
* [http://extensions.joomla.org/extensions/access-a-security/site-security/backup/1606 Akeeba Backup] is popular for backup and restore. See more [https://extensions.joomla.org/tags/backup/ backup tools].&lt;br /&gt;
==Related information== &lt;br /&gt;
[[Special:MyLanguage/:Pre-Update_Check|Pre-Update_Check]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/3/zh-tw&amp;diff=1033663</id>
		<title>Translations:Joomla 3.x to 4.x Step by Step Migration/3/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/3/zh-tw&amp;diff=1033663"/>
		<updated>2025-01-07T01:12:55Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;== Intro == 從 Joomla! 3.10.x 遷移到 4.x 被視為一次小規模遷移。這是因為 Joomla 核心擴展將通過 Joomla! 後台 (管理員) 中的「更新」元件進...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
從 Joomla! 3.10.x 遷移到 4.x 被視為一次小規模遷移。這是因為 Joomla 核心擴展將通過 Joomla! 後台 (管理員) 中的「更新」元件進行「一鍵式」升級。許多第三方擴展也支持一鍵式升級。有些則不支持。請逐一檢查每個擴展，並確定從 3.10 到 4.x 的升級路徑。如果您還沒有閱讀，請先閱讀 [[S:MyLanguage/Migration Step by Step Self Assessment|自我評估]] 和 [[S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|規劃 3.10 到 4.x 遷移]]，然後再按照以下步驟操作。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033662</id>
		<title>Joomla 3.x to 4.x Step by Step Migration/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033662"/>
		<updated>2025-01-07T01:12:21Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;本文將一步步的將你的 Joomla 3.10 網站遷移到 4.x。由於實際的應用情境可能有數百種，我們將給你一個最基本的流程可以遵循。大量...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{version|3.10,4.x}}&lt;br /&gt;
{{warning|title=警告！|本指南假設您從 Joomla 3.10.x 開始。如果您使用的是早期版本，請務必先升級到 Joomla 3.10，然後再升級到 Joomla 4。 &lt;br /&gt;
&lt;br /&gt;
無需急於一時。請確保所有擴充套件都已準備好支援 Joomla 4.x。Joomla 3.10.x 將支援至 2023 年 8 月 16 日。}}&lt;br /&gt;
&lt;br /&gt;
本文將一步步的將你的 Joomla 3.10 網站遷移到 4.x。由於實際的應用情境可能有數百種，我們將給你一個最基本的流程可以遵循。大量的第三方擴充套件可能會造成較為複雜的遷移流程，建議你可以聯絡第三方套件的作者詢問相關建議來幫助您遷移這些套件至最新版本。&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
The migration from Joomla! 3.10.x to 4.x is considered a mini-migration. This is because the Joomla core extensions will upgrade with a “one-click” upgrade via the Joomla! Update component in the Backend (Administrator) of Joomla. Many third-party extensions are a one-click upgrade too. Some are not. Look at each one and determine what path the extension needs to follow to get from 3.10 to 4.x. If you haven&#039;t already, read the [[S:MyLanguage/Migration Step by Step Self Assessment|Self Assessment]] and [[S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for 3.10 to 4.x Migration]] prior to following the steps below.&lt;br /&gt;
&amp;lt;/br&amp;gt;Joomla! Core Extensions are:&lt;br /&gt;
* Categories&lt;br /&gt;
* Articles&lt;br /&gt;
* Menus&lt;br /&gt;
* Modules (core modules - not third-party)&lt;br /&gt;
* Action Logs&lt;br /&gt;
* Banners&lt;br /&gt;
* Fields&lt;br /&gt;
* Content History&lt;br /&gt;
* Contacts&lt;br /&gt;
* Messaging&lt;br /&gt;
* Newsfeeds&lt;br /&gt;
* Redirect&lt;br /&gt;
* Search (decoupled in 4.x. Existing 3.x sites will still migrate it. However we recommend using Smart Search going forward. See Notes under Assess Each Extension)&lt;br /&gt;
* Smart Search&lt;br /&gt;
* Tags&lt;br /&gt;
* Weblinks (decoupled but your site may be using it and it will migrate. See Notes under Assess Each Extension.)&lt;br /&gt;
&lt;br /&gt;
== Step by Step ==&lt;br /&gt;
=== Set Up a Development Location ===&lt;br /&gt;
# Make sure you are running the latest Joomla 3.10.x version before proceeding.&lt;br /&gt;
# Take a backup of your live 3.10.x site. You can use a suggested tool (see the &#039;&#039;Suggested Tools&#039;&#039; at the bottom of page) or you can do this manually.&lt;br /&gt;
#*[[S:MyLanguage/Backup_Basics_for_a_Joomla!_Web_Site|Backup Basics for a Joomla! Web Site]]&lt;br /&gt;
#*[[S:MyLanguage/What_are_the_best_practices_for_site_backups%3F|What are the best practices for site backups?]]&lt;br /&gt;
# Make sure your environment meets the [https://downloads.joomla.org/technical-requirements technical requirements for Joomla 4].&lt;br /&gt;
# Create a new database and new user to restore your 3.10.x site to. &lt;br /&gt;
# Create a testing site or build area to work in and restore the backup copy of your 3.10.x site in one of the following places:&lt;br /&gt;
#* A subdomain.&lt;br /&gt;
#* A subdirectory.&lt;br /&gt;
#* A local device. Joomla has a detailed tutorial on installing [https://sourceforge.net/projects/xampp/ XAMPP] at [[XAMPP]]. However [https://www.wampserver.com/en/ WAMP], [https://www.mamp.info/en/windows/ MAMP], [https://sourceforge.net/projects/lampas/ LAMP] are all suitable alternatives.&lt;br /&gt;
#* A new hosting account on a temporary domain in the root. (If you would like to change hosts in the process of migration.)&lt;br /&gt;
#** Restoring a site on a local device. See [[S:MyLanguage/Installing Joomla locally|Installing Joomla locally]] and [[S:MyLanguage/Setting up your workstation for Joomla development|Setting up your workstation for Joomla development]].&lt;br /&gt;
#** Restoring a site with a tool listed at the bottom of the page. (Read the developer documentation.)&lt;br /&gt;
# In your test location, update your Joomla! 3.10.x instance to the latest maintenance release.&lt;br /&gt;
# Make sure you have the latest database schema updated to the latest version 3.10.x version by going to {{rarr|Extension Manager,Database}} tab. If your schema is not up to date as in the following image, click the &#039;&#039;&#039;Fix&#039;&#039;&#039; button:{{-}}[[File:J310-admin-extension-database-fix-en.png|border|800px]]&lt;br /&gt;
# Empty trash: Do you have any articles in the trash? Delete them (and any associated media if not in use elsewhere on the site). Articles (categories and menu items too) left in the trash can cause migration issues.&lt;br /&gt;
# Test.&lt;br /&gt;
# Backup again.&lt;br /&gt;
&lt;br /&gt;
=== Assess Each Extension ===&lt;br /&gt;
In your [[S:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x|planning]], you determined that third-party extensions were staying or going and how they migrate. For this portion of the Step by Step, you’ll be using two different sections of the site extensively; The Pre-Update Check in {{rarr|Components,Joomla! Update}} and {{rarr|Extensions,Manage,Manage}}. You are going to be looking at every single extension installed on your site. You will be determining if they need to be updated to the latest version or uninstalled. More details in [[Special:MyLanguage/:Pre-Update_Check|Pre-Update Check]].&lt;br /&gt;
# Using the &#039;&#039;&#039;Pre-Update Check&#039;&#039;&#039;: in order to use the Pre-Update Check, you will need to set the Joomla! Update component to Joomla 4. To do this follow:&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version (must be 3.10.x) and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:Migration_J3toJ4_update_channel-en.png|border|800px]]{{-}}&lt;br /&gt;
# Click Save &amp;amp; Close&lt;br /&gt;
# You will then see your Installed Joomla Version, the latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-admin-update_to_4-pre_update_check-en.png|border|800px]]{{amboxNew|image=notice|style=notice|title={{{title|Important Notice}}}|text=&#039;&#039;&#039;Do NOT update to Joomla! 4 right now. This is only to prepare your third-party extensions and get the site compatible with Joomla! 4.&#039;&#039;&#039;}}&lt;br /&gt;
# Look at the Pre-Update Check and the Extension Pre-Update Check in the Pre-Update Check tab of the Joomla Update component. If any extension that isn’t in your planning is listed here, add it to your list of extensions to investigate.&lt;br /&gt;
# If you migrated from Joomla! 2.5 to 3.x in the past, there may be some leftover extensions that need to be cleaned up. The following are older 2.5 or 3.x extensions that need to be uninstalled before updating to Joomla 4:&lt;br /&gt;
#;* plg_content_geshi&lt;br /&gt;
#;* PKG_JOOMLA &lt;br /&gt;
#;* Bluestork Administrator Template&lt;br /&gt;
#;* Beez_20&lt;br /&gt;
#;* Beez5&lt;br /&gt;
#;* Atomic&lt;br /&gt;
## When it comes to templates, uninstall all core Frontend or Backend templates except Protostar and Beez3 (site templates) and Isis or Hathor (Administrator templates). &#039;&#039;&#039;Note&#039;&#039;&#039; Protostar is &#039;&#039;&#039;not&#039;&#039;&#039; compatible with Joomla 4. Upon migration it will disappear. You&#039;ll need to have one template selected as &amp;quot;default&amp;quot; and you can use Protostar or Beez3. Protostar will disappear upon migration to Joomla 4.x.&lt;br /&gt;
## If you come across other files that need to be uninstalled, please add them to this page. This is a wiki so anyone can add to the page. Thank you in advance for your service.&lt;br /&gt;
# You will notice the tags for whether an extension is compatible or not. These tags generally tell a true story if they say No or Yes. If they say “Missing Compatibility Tag” it means that the extension developer didn’t use a tag in their extension so we don’t know if it is or isn’t compatible with Joomla 4. Talk to the developer to verify.&lt;br /&gt;
# &#039;&#039;&#039;Update Extensions&#039;&#039;&#039;: update any extensions that you will keep in your website. In Joomla! 3.10.x you can go to {{rarr|Extension Manager,Update tab}} and click &#039;&#039;&#039;Find Updates&#039;&#039;&#039; that will add a tooltip in the Version column, under the Manage tab, giving some compatibility information from the Backend. This functionality only supports extensions that update via the Extension Manager Update tab. If you have extensions installed that do not use the Joomla extension update they need to be assessed manually as detailed below. The same goes for those extensions that have a tooltip. You will still need to check the type of package and migration path with the extension developer to verify how to upgrade/migrate.&lt;br /&gt;
# Investigate and Uninstall Extensions Extensions: go to {{rarr|Extension Manager,Manage}}&lt;br /&gt;
# Click the Button &#039;&#039;Search Tools&#039;&#039; to show the filter options&lt;br /&gt;
# Select Package from the &#039;&#039;Select Type&#039;&#039; drop-down.{{-}}[[File:J310-admin-extension-manage-package-en.png|800px]]{{-}}{{note|Selecting Package first is recommended because if there is something you need to uninstall in a package, it will automatically uninstall the associated Modules, Plugins, or anything else in the package at one time.}}&lt;br /&gt;
# Uninstall any Packages that are no longer needed or will not be migrating to Joomla 4.&lt;br /&gt;
# Repeat this process of going through the Manage tab for all Types in the drop-down: Component, File, Language, Library, Module, Plugin and Template. If the Author states Joomla! Project, then leave those extensions alone. For all others, make sure that you uninstall those not in use or not compatible with Joomla!&amp;amp;nbsp;4.x.{{-}}{{note|&#039;&#039;&#039;NOTE!&#039;&#039;&#039; You will not be able to uninstall any template that is set as default. Select a Core supported template such as Beez3 or Protostar and then uninstall the template if you need to do so. &amp;lt;br /&amp;gt;&#039;&#039;Another reminder:&#039;&#039; &#039;&#039;&#039;Protostar is not compatible with Joomla 4.x&#039;&#039;&#039;. Upon migration it will disappear. Selecting it as default simply gets you to Joomla 4.x.|type=serious}}&lt;br /&gt;
# Make a note of any versions of Packages and Components currently running that you will be keeping on your site. You can copy/paste them into a document for reference.&lt;br /&gt;
# For any extensions you are keeping but don&#039;t use the Extension Manager to one-click update ({{rarr|Extensions,Manage,Update}}) update all extensions to the latest versions.&lt;br /&gt;
# Before and as you update, note if the extensions have both 3.10.x &amp;amp; 4.x versions in the same package. If so, they will be fine to &amp;quot;one-click update.&amp;quot; If not, and 3.10 and 4.x have different packages, look at them case by case. They will normally fall into one of the following scenarios:&lt;br /&gt;
#* The extension has separate packages but upon upgrading to 4.x, they automatically detect this and still work. Make sure the developer confirms this.&lt;br /&gt;
#* The extension has separate packages that need to be uninstalled in 3.10.x and then installed with the Joomla 4.x version once the site is migrated. An example of this might be a content plugin. It is simple to uninstall it in 3.10.x and then install it again in 4.x.&lt;br /&gt;
#* See [[S:MyLanguage/Template_Considerations_During_Migration|Template Considerations]] for more specific information on templates and [[S:MyLanguage/J3.x:Converting_A_Previous_Joomla!_Version_Template|Converting a previous Joomla! Version template]]&lt;br /&gt;
&lt;br /&gt;
==== Notes on Search (com_search) ====&lt;br /&gt;
Search (com_search) will be decoupled in Joomla 4.x. Search (com_search) will migrate to Joomla 4. After migration, you&#039;ll need to update it to the Joomla 4.x version via com_installer. It will continue to be maintained, but more the same way a third-party extension is by receiving updates via com_installer. It is recommended to use Smart Search (com_finder) going forward. Search will still be available at https://extensions.joomla.org/category/official-extensions/.&lt;br /&gt;
&lt;br /&gt;
==== Notes on Weblinks ====&lt;br /&gt;
Weblinks was decoupled back in Joomla 3.4. If it was in use on a 2.5 site, the migration process would note this and migrate the Weblinks component and data. For the migration from 3.10.x to 4.x, it will be the same. It is still available and maintained on the JED at [https://extensions.joomla.org/category/official-extensions/ Official Extensions].&lt;br /&gt;
&lt;br /&gt;
==== Notes on Legacy Routing ==== &lt;br /&gt;
Legacy routing will not be available in Joomla 4.x. Only Modern will be available. When you do the migration, if you are using Legacy routing, the system will automatically change them to Modern routing. You will want to run a broken link checker on your site after migrating to Joomla 4.x and &#039;&#039;before you go live&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Going to Joomla! 4.x ===&lt;br /&gt;
Once you have either updated or uninstalled your third-party extensions so that only those compatible with Joomla! 4 remain in your installation, continue with the following steps:&lt;br /&gt;
# Go to {{rarr|System,Global Configuration,Server tab}} and turn Error Reporting from System Default to Maximum. Make sure to Save &amp;amp; Close.{{-}} [[File:J310-system-global-config-server-tab-en.png|border|500px]]&lt;br /&gt;
# Take another backup.&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:J310-component-joomla-update-select-support-en.png|border|500px]]&lt;br /&gt;
# Click Save &amp;amp; Close.&lt;br /&gt;
# You will then see your Installed Joomla Version, the Latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-to-j4-dev-update-found-en.png|border|800px]]&lt;br /&gt;
# If the update is not showing up, go to {{rarr|Extensions,Update}} and select Clear Cache from the toolbar. Now the update to Joomla! 4 should show up.&lt;br /&gt;
# Cross your fingers, and make sure you have that backup available in case.&lt;br /&gt;
# Click the Install the Update button.&lt;br /&gt;
# Make tea whilst the status bar loads to fully green. The amount of time this takes is dependent on your site, internet connection and server speed. The process can take several minutes. There are over 12,000 files comprising 75 megabytes to be extracted. When the update is finished, you might be logged out of the Administrator. Sign in again, if necessary&lt;br /&gt;
# If all goes well, you will get to a totally new look to the Backend panel.{{-}}[[File:j4-administrator-overview-en.png|border|800px]]&lt;br /&gt;
# Go to {{rarr|System,Maintenance,Database}} and click &#039;&#039;Fix&#039;&#039; if any errors show.&lt;br /&gt;
# In {{rarr|System,Install,Discover}} see if there are any extensions to install. (There shouldn&#039;t be any!)&lt;br /&gt;
# Go to the Frontend of your site and see if it shows up even if it’s not the right template. If so, continue. If not, see [[S:MyLanguage/Joomla 3.10 to 4.x Common Migration Errors|common errors during migration]].&lt;br /&gt;
# Take a backup.&lt;br /&gt;
# Install your new template or other extensions if you have them to install. Back up often.&lt;br /&gt;
# Configure them. Back up often.&lt;br /&gt;
# Run a broken link checker and fix any broken links.&lt;br /&gt;
# Test everything. Back up often.&lt;br /&gt;
# If everything works as expected, turn Error Reporting back to System Default ({{rarr|System,Global Configuration,Server tab}}). Make sure to Save &amp;amp; Close.&lt;br /&gt;
# Be sure to read the post-installation messages.&lt;br /&gt;
=== Going Live with Your Joomla! 4.x Site ===&lt;br /&gt;
# When you’re ready to go live, back up your 3.10 site for the last time. Restore it in a subdirectory or subdomain if you would like to.&lt;br /&gt;
# Back up your Joomla! 4.x site and move or restore your Joomla! 4.x site to the root (or change nameservers if you were building on a temporary domain at a new hosting account root).&lt;br /&gt;
# Test again.&lt;br /&gt;
# &#039;&#039;&#039;If&#039;&#039;&#039; you have made security changes to &#039;&#039;.htaccess&#039;&#039; file in the past, you may need to change a line (or lines) in it to update to Joomla 4. Please go to [https://docs.joomla.org/Htaccess_changes_after_joomla4.0.4 Htaccess changes after joomla4.0.4] to determine if you need to change your file. &lt;br /&gt;
# Remove the Joomla! 3.10 site from the server within a couple of days unless you have edited your &#039;&#039;robots.txt&#039;&#039; file to block the search engine spiders and disabled the Frontend of the site.&lt;br /&gt;
# Remove all development sites you have been working with or keep them up-to-date if they are running a current version in order to ward off hack attempts on your server. &lt;br /&gt;
&lt;br /&gt;
If you had data change on the 3.10 site while you were migrating to 4.x, you will want to get that data moved over to the 4.x site before going live. You can do this manually (make sure you keep the same user IDs - go in order) or by using a [https://extensions.joomla.org/category/migration-a-conversion/data-import-a-export%20transfer%20tool/third-party%20extension/ third party extension].&lt;br /&gt;
&lt;br /&gt;
== Suggested Tools ==&lt;br /&gt;
* [http://extensions.joomla.org/extensions/access-a-security/site-security/backup/1606 Akeeba Backup] is popular for backup and restore. See more [https://extensions.joomla.org/tags/backup/ backup tools].&lt;br /&gt;
==Related information== &lt;br /&gt;
[[Special:MyLanguage/:Pre-Update_Check|Pre-Update_Check]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/2/zh-tw&amp;diff=1033661</id>
		<title>Translations:Joomla 3.x to 4.x Step by Step Migration/2/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/2/zh-tw&amp;diff=1033661"/>
		<updated>2025-01-07T01:12:20Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;本文將一步步的將你的 Joomla 3.10 網站遷移到 4.x。由於實際的應用情境可能有數百種，我們將給你一個最基本的流程可以遵循。大量...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本文將一步步的將你的 Joomla 3.10 網站遷移到 4.x。由於實際的應用情境可能有數百種，我們將給你一個最基本的流程可以遵循。大量的第三方擴充套件可能會造成較為複雜的遷移流程，建議你可以聯絡第三方套件的作者詢問相關建議來幫助您遷移這些套件至最新版本。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033660</id>
		<title>Joomla 3.x to 4.x Step by Step Migration/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033660"/>
		<updated>2025-01-07T01:12:02Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;無需急於一時。請確保所有擴充套件都已準備好支援 Joomla 4.x。Joomla 3.10.x 將支援至 2023 年 8 月 16 日。&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{version|3.10,4.x}}&lt;br /&gt;
{{warning|title=警告！|本指南假設您從 Joomla 3.10.x 開始。如果您使用的是早期版本，請務必先升級到 Joomla 3.10，然後再升級到 Joomla 4。 &lt;br /&gt;
&lt;br /&gt;
無需急於一時。請確保所有擴充套件都已準備好支援 Joomla 4.x。Joomla 3.10.x 將支援至 2023 年 8 月 16 日。}}&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step instructions to migrate your 3.10.x site to Joomla! 4.x. While there are different scenarios, this will give you the basic procedure to follow. Complex migrations will likely be a result of installed third-party extensions. You are encouraged to contact the developers of third-party extensions installed on your Joomla site for their suggested migration path.&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
The migration from Joomla! 3.10.x to 4.x is considered a mini-migration. This is because the Joomla core extensions will upgrade with a “one-click” upgrade via the Joomla! Update component in the Backend (Administrator) of Joomla. Many third-party extensions are a one-click upgrade too. Some are not. Look at each one and determine what path the extension needs to follow to get from 3.10 to 4.x. If you haven&#039;t already, read the [[S:MyLanguage/Migration Step by Step Self Assessment|Self Assessment]] and [[S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for 3.10 to 4.x Migration]] prior to following the steps below.&lt;br /&gt;
&amp;lt;/br&amp;gt;Joomla! Core Extensions are:&lt;br /&gt;
* Categories&lt;br /&gt;
* Articles&lt;br /&gt;
* Menus&lt;br /&gt;
* Modules (core modules - not third-party)&lt;br /&gt;
* Action Logs&lt;br /&gt;
* Banners&lt;br /&gt;
* Fields&lt;br /&gt;
* Content History&lt;br /&gt;
* Contacts&lt;br /&gt;
* Messaging&lt;br /&gt;
* Newsfeeds&lt;br /&gt;
* Redirect&lt;br /&gt;
* Search (decoupled in 4.x. Existing 3.x sites will still migrate it. However we recommend using Smart Search going forward. See Notes under Assess Each Extension)&lt;br /&gt;
* Smart Search&lt;br /&gt;
* Tags&lt;br /&gt;
* Weblinks (decoupled but your site may be using it and it will migrate. See Notes under Assess Each Extension.)&lt;br /&gt;
&lt;br /&gt;
== Step by Step ==&lt;br /&gt;
=== Set Up a Development Location ===&lt;br /&gt;
# Make sure you are running the latest Joomla 3.10.x version before proceeding.&lt;br /&gt;
# Take a backup of your live 3.10.x site. You can use a suggested tool (see the &#039;&#039;Suggested Tools&#039;&#039; at the bottom of page) or you can do this manually.&lt;br /&gt;
#*[[S:MyLanguage/Backup_Basics_for_a_Joomla!_Web_Site|Backup Basics for a Joomla! Web Site]]&lt;br /&gt;
#*[[S:MyLanguage/What_are_the_best_practices_for_site_backups%3F|What are the best practices for site backups?]]&lt;br /&gt;
# Make sure your environment meets the [https://downloads.joomla.org/technical-requirements technical requirements for Joomla 4].&lt;br /&gt;
# Create a new database and new user to restore your 3.10.x site to. &lt;br /&gt;
# Create a testing site or build area to work in and restore the backup copy of your 3.10.x site in one of the following places:&lt;br /&gt;
#* A subdomain.&lt;br /&gt;
#* A subdirectory.&lt;br /&gt;
#* A local device. Joomla has a detailed tutorial on installing [https://sourceforge.net/projects/xampp/ XAMPP] at [[XAMPP]]. However [https://www.wampserver.com/en/ WAMP], [https://www.mamp.info/en/windows/ MAMP], [https://sourceforge.net/projects/lampas/ LAMP] are all suitable alternatives.&lt;br /&gt;
#* A new hosting account on a temporary domain in the root. (If you would like to change hosts in the process of migration.)&lt;br /&gt;
#** Restoring a site on a local device. See [[S:MyLanguage/Installing Joomla locally|Installing Joomla locally]] and [[S:MyLanguage/Setting up your workstation for Joomla development|Setting up your workstation for Joomla development]].&lt;br /&gt;
#** Restoring a site with a tool listed at the bottom of the page. (Read the developer documentation.)&lt;br /&gt;
# In your test location, update your Joomla! 3.10.x instance to the latest maintenance release.&lt;br /&gt;
# Make sure you have the latest database schema updated to the latest version 3.10.x version by going to {{rarr|Extension Manager,Database}} tab. If your schema is not up to date as in the following image, click the &#039;&#039;&#039;Fix&#039;&#039;&#039; button:{{-}}[[File:J310-admin-extension-database-fix-en.png|border|800px]]&lt;br /&gt;
# Empty trash: Do you have any articles in the trash? Delete them (and any associated media if not in use elsewhere on the site). Articles (categories and menu items too) left in the trash can cause migration issues.&lt;br /&gt;
# Test.&lt;br /&gt;
# Backup again.&lt;br /&gt;
&lt;br /&gt;
=== Assess Each Extension ===&lt;br /&gt;
In your [[S:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x|planning]], you determined that third-party extensions were staying or going and how they migrate. For this portion of the Step by Step, you’ll be using two different sections of the site extensively; The Pre-Update Check in {{rarr|Components,Joomla! Update}} and {{rarr|Extensions,Manage,Manage}}. You are going to be looking at every single extension installed on your site. You will be determining if they need to be updated to the latest version or uninstalled. More details in [[Special:MyLanguage/:Pre-Update_Check|Pre-Update Check]].&lt;br /&gt;
# Using the &#039;&#039;&#039;Pre-Update Check&#039;&#039;&#039;: in order to use the Pre-Update Check, you will need to set the Joomla! Update component to Joomla 4. To do this follow:&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version (must be 3.10.x) and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:Migration_J3toJ4_update_channel-en.png|border|800px]]{{-}}&lt;br /&gt;
# Click Save &amp;amp; Close&lt;br /&gt;
# You will then see your Installed Joomla Version, the latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-admin-update_to_4-pre_update_check-en.png|border|800px]]{{amboxNew|image=notice|style=notice|title={{{title|Important Notice}}}|text=&#039;&#039;&#039;Do NOT update to Joomla! 4 right now. This is only to prepare your third-party extensions and get the site compatible with Joomla! 4.&#039;&#039;&#039;}}&lt;br /&gt;
# Look at the Pre-Update Check and the Extension Pre-Update Check in the Pre-Update Check tab of the Joomla Update component. If any extension that isn’t in your planning is listed here, add it to your list of extensions to investigate.&lt;br /&gt;
# If you migrated from Joomla! 2.5 to 3.x in the past, there may be some leftover extensions that need to be cleaned up. The following are older 2.5 or 3.x extensions that need to be uninstalled before updating to Joomla 4:&lt;br /&gt;
#;* plg_content_geshi&lt;br /&gt;
#;* PKG_JOOMLA &lt;br /&gt;
#;* Bluestork Administrator Template&lt;br /&gt;
#;* Beez_20&lt;br /&gt;
#;* Beez5&lt;br /&gt;
#;* Atomic&lt;br /&gt;
## When it comes to templates, uninstall all core Frontend or Backend templates except Protostar and Beez3 (site templates) and Isis or Hathor (Administrator templates). &#039;&#039;&#039;Note&#039;&#039;&#039; Protostar is &#039;&#039;&#039;not&#039;&#039;&#039; compatible with Joomla 4. Upon migration it will disappear. You&#039;ll need to have one template selected as &amp;quot;default&amp;quot; and you can use Protostar or Beez3. Protostar will disappear upon migration to Joomla 4.x.&lt;br /&gt;
## If you come across other files that need to be uninstalled, please add them to this page. This is a wiki so anyone can add to the page. Thank you in advance for your service.&lt;br /&gt;
# You will notice the tags for whether an extension is compatible or not. These tags generally tell a true story if they say No or Yes. If they say “Missing Compatibility Tag” it means that the extension developer didn’t use a tag in their extension so we don’t know if it is or isn’t compatible with Joomla 4. Talk to the developer to verify.&lt;br /&gt;
# &#039;&#039;&#039;Update Extensions&#039;&#039;&#039;: update any extensions that you will keep in your website. In Joomla! 3.10.x you can go to {{rarr|Extension Manager,Update tab}} and click &#039;&#039;&#039;Find Updates&#039;&#039;&#039; that will add a tooltip in the Version column, under the Manage tab, giving some compatibility information from the Backend. This functionality only supports extensions that update via the Extension Manager Update tab. If you have extensions installed that do not use the Joomla extension update they need to be assessed manually as detailed below. The same goes for those extensions that have a tooltip. You will still need to check the type of package and migration path with the extension developer to verify how to upgrade/migrate.&lt;br /&gt;
# Investigate and Uninstall Extensions Extensions: go to {{rarr|Extension Manager,Manage}}&lt;br /&gt;
# Click the Button &#039;&#039;Search Tools&#039;&#039; to show the filter options&lt;br /&gt;
# Select Package from the &#039;&#039;Select Type&#039;&#039; drop-down.{{-}}[[File:J310-admin-extension-manage-package-en.png|800px]]{{-}}{{note|Selecting Package first is recommended because if there is something you need to uninstall in a package, it will automatically uninstall the associated Modules, Plugins, or anything else in the package at one time.}}&lt;br /&gt;
# Uninstall any Packages that are no longer needed or will not be migrating to Joomla 4.&lt;br /&gt;
# Repeat this process of going through the Manage tab for all Types in the drop-down: Component, File, Language, Library, Module, Plugin and Template. If the Author states Joomla! Project, then leave those extensions alone. For all others, make sure that you uninstall those not in use or not compatible with Joomla!&amp;amp;nbsp;4.x.{{-}}{{note|&#039;&#039;&#039;NOTE!&#039;&#039;&#039; You will not be able to uninstall any template that is set as default. Select a Core supported template such as Beez3 or Protostar and then uninstall the template if you need to do so. &amp;lt;br /&amp;gt;&#039;&#039;Another reminder:&#039;&#039; &#039;&#039;&#039;Protostar is not compatible with Joomla 4.x&#039;&#039;&#039;. Upon migration it will disappear. Selecting it as default simply gets you to Joomla 4.x.|type=serious}}&lt;br /&gt;
# Make a note of any versions of Packages and Components currently running that you will be keeping on your site. You can copy/paste them into a document for reference.&lt;br /&gt;
# For any extensions you are keeping but don&#039;t use the Extension Manager to one-click update ({{rarr|Extensions,Manage,Update}}) update all extensions to the latest versions.&lt;br /&gt;
# Before and as you update, note if the extensions have both 3.10.x &amp;amp; 4.x versions in the same package. If so, they will be fine to &amp;quot;one-click update.&amp;quot; If not, and 3.10 and 4.x have different packages, look at them case by case. They will normally fall into one of the following scenarios:&lt;br /&gt;
#* The extension has separate packages but upon upgrading to 4.x, they automatically detect this and still work. Make sure the developer confirms this.&lt;br /&gt;
#* The extension has separate packages that need to be uninstalled in 3.10.x and then installed with the Joomla 4.x version once the site is migrated. An example of this might be a content plugin. It is simple to uninstall it in 3.10.x and then install it again in 4.x.&lt;br /&gt;
#* See [[S:MyLanguage/Template_Considerations_During_Migration|Template Considerations]] for more specific information on templates and [[S:MyLanguage/J3.x:Converting_A_Previous_Joomla!_Version_Template|Converting a previous Joomla! Version template]]&lt;br /&gt;
&lt;br /&gt;
==== Notes on Search (com_search) ====&lt;br /&gt;
Search (com_search) will be decoupled in Joomla 4.x. Search (com_search) will migrate to Joomla 4. After migration, you&#039;ll need to update it to the Joomla 4.x version via com_installer. It will continue to be maintained, but more the same way a third-party extension is by receiving updates via com_installer. It is recommended to use Smart Search (com_finder) going forward. Search will still be available at https://extensions.joomla.org/category/official-extensions/.&lt;br /&gt;
&lt;br /&gt;
==== Notes on Weblinks ====&lt;br /&gt;
Weblinks was decoupled back in Joomla 3.4. If it was in use on a 2.5 site, the migration process would note this and migrate the Weblinks component and data. For the migration from 3.10.x to 4.x, it will be the same. It is still available and maintained on the JED at [https://extensions.joomla.org/category/official-extensions/ Official Extensions].&lt;br /&gt;
&lt;br /&gt;
==== Notes on Legacy Routing ==== &lt;br /&gt;
Legacy routing will not be available in Joomla 4.x. Only Modern will be available. When you do the migration, if you are using Legacy routing, the system will automatically change them to Modern routing. You will want to run a broken link checker on your site after migrating to Joomla 4.x and &#039;&#039;before you go live&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Going to Joomla! 4.x ===&lt;br /&gt;
Once you have either updated or uninstalled your third-party extensions so that only those compatible with Joomla! 4 remain in your installation, continue with the following steps:&lt;br /&gt;
# Go to {{rarr|System,Global Configuration,Server tab}} and turn Error Reporting from System Default to Maximum. Make sure to Save &amp;amp; Close.{{-}} [[File:J310-system-global-config-server-tab-en.png|border|500px]]&lt;br /&gt;
# Take another backup.&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:J310-component-joomla-update-select-support-en.png|border|500px]]&lt;br /&gt;
# Click Save &amp;amp; Close.&lt;br /&gt;
# You will then see your Installed Joomla Version, the Latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-to-j4-dev-update-found-en.png|border|800px]]&lt;br /&gt;
# If the update is not showing up, go to {{rarr|Extensions,Update}} and select Clear Cache from the toolbar. Now the update to Joomla! 4 should show up.&lt;br /&gt;
# Cross your fingers, and make sure you have that backup available in case.&lt;br /&gt;
# Click the Install the Update button.&lt;br /&gt;
# Make tea whilst the status bar loads to fully green. The amount of time this takes is dependent on your site, internet connection and server speed. The process can take several minutes. There are over 12,000 files comprising 75 megabytes to be extracted. When the update is finished, you might be logged out of the Administrator. Sign in again, if necessary&lt;br /&gt;
# If all goes well, you will get to a totally new look to the Backend panel.{{-}}[[File:j4-administrator-overview-en.png|border|800px]]&lt;br /&gt;
# Go to {{rarr|System,Maintenance,Database}} and click &#039;&#039;Fix&#039;&#039; if any errors show.&lt;br /&gt;
# In {{rarr|System,Install,Discover}} see if there are any extensions to install. (There shouldn&#039;t be any!)&lt;br /&gt;
# Go to the Frontend of your site and see if it shows up even if it’s not the right template. If so, continue. If not, see [[S:MyLanguage/Joomla 3.10 to 4.x Common Migration Errors|common errors during migration]].&lt;br /&gt;
# Take a backup.&lt;br /&gt;
# Install your new template or other extensions if you have them to install. Back up often.&lt;br /&gt;
# Configure them. Back up often.&lt;br /&gt;
# Run a broken link checker and fix any broken links.&lt;br /&gt;
# Test everything. Back up often.&lt;br /&gt;
# If everything works as expected, turn Error Reporting back to System Default ({{rarr|System,Global Configuration,Server tab}}). Make sure to Save &amp;amp; Close.&lt;br /&gt;
# Be sure to read the post-installation messages.&lt;br /&gt;
=== Going Live with Your Joomla! 4.x Site ===&lt;br /&gt;
# When you’re ready to go live, back up your 3.10 site for the last time. Restore it in a subdirectory or subdomain if you would like to.&lt;br /&gt;
# Back up your Joomla! 4.x site and move or restore your Joomla! 4.x site to the root (or change nameservers if you were building on a temporary domain at a new hosting account root).&lt;br /&gt;
# Test again.&lt;br /&gt;
# &#039;&#039;&#039;If&#039;&#039;&#039; you have made security changes to &#039;&#039;.htaccess&#039;&#039; file in the past, you may need to change a line (or lines) in it to update to Joomla 4. Please go to [https://docs.joomla.org/Htaccess_changes_after_joomla4.0.4 Htaccess changes after joomla4.0.4] to determine if you need to change your file. &lt;br /&gt;
# Remove the Joomla! 3.10 site from the server within a couple of days unless you have edited your &#039;&#039;robots.txt&#039;&#039; file to block the search engine spiders and disabled the Frontend of the site.&lt;br /&gt;
# Remove all development sites you have been working with or keep them up-to-date if they are running a current version in order to ward off hack attempts on your server. &lt;br /&gt;
&lt;br /&gt;
If you had data change on the 3.10 site while you were migrating to 4.x, you will want to get that data moved over to the 4.x site before going live. You can do this manually (make sure you keep the same user IDs - go in order) or by using a [https://extensions.joomla.org/category/migration-a-conversion/data-import-a-export%20transfer%20tool/third-party%20extension/ third party extension].&lt;br /&gt;
&lt;br /&gt;
== Suggested Tools ==&lt;br /&gt;
* [http://extensions.joomla.org/extensions/access-a-security/site-security/backup/1606 Akeeba Backup] is popular for backup and restore. See more [https://extensions.joomla.org/tags/backup/ backup tools].&lt;br /&gt;
==Related information== &lt;br /&gt;
[[Special:MyLanguage/:Pre-Update_Check|Pre-Update_Check]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/59/zh-tw&amp;diff=1033659</id>
		<title>Translations:Joomla 3.x to 4.x Step by Step Migration/59/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/59/zh-tw&amp;diff=1033659"/>
		<updated>2025-01-07T01:11:59Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;無需急於一時。請確保所有擴充套件都已準備好支援 Joomla 4.x。Joomla 3.10.x 將支援至 2023 年 8 月 16 日。&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;無需急於一時。請確保所有擴充套件都已準備好支援 Joomla 4.x。Joomla 3.10.x 將支援至 2023 年 8 月 16 日。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033658</id>
		<title>Joomla 3.x to 4.x Step by Step Migration/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033658"/>
		<updated>2025-01-07T01:11:50Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;本指南假設您從 Joomla 3.10.x 開始。如果您使用的是早期版本，請務必先升級到 Joomla 3.10，然後再升級到 Joomla 4。&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{version|3.10,4.x}}&lt;br /&gt;
{{warning|title=警告！|本指南假設您從 Joomla 3.10.x 開始。如果您使用的是早期版本，請務必先升級到 Joomla 3.10，然後再升級到 Joomla 4。 &lt;br /&gt;
&lt;br /&gt;
There is no rush. Make sure all your extensions are ready for Joomla 4.x. Joomla 3.10.x will be supported until 16 August 2023.}}&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step instructions to migrate your 3.10.x site to Joomla! 4.x. While there are different scenarios, this will give you the basic procedure to follow. Complex migrations will likely be a result of installed third-party extensions. You are encouraged to contact the developers of third-party extensions installed on your Joomla site for their suggested migration path.&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
The migration from Joomla! 3.10.x to 4.x is considered a mini-migration. This is because the Joomla core extensions will upgrade with a “one-click” upgrade via the Joomla! Update component in the Backend (Administrator) of Joomla. Many third-party extensions are a one-click upgrade too. Some are not. Look at each one and determine what path the extension needs to follow to get from 3.10 to 4.x. If you haven&#039;t already, read the [[S:MyLanguage/Migration Step by Step Self Assessment|Self Assessment]] and [[S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for 3.10 to 4.x Migration]] prior to following the steps below.&lt;br /&gt;
&amp;lt;/br&amp;gt;Joomla! Core Extensions are:&lt;br /&gt;
* Categories&lt;br /&gt;
* Articles&lt;br /&gt;
* Menus&lt;br /&gt;
* Modules (core modules - not third-party)&lt;br /&gt;
* Action Logs&lt;br /&gt;
* Banners&lt;br /&gt;
* Fields&lt;br /&gt;
* Content History&lt;br /&gt;
* Contacts&lt;br /&gt;
* Messaging&lt;br /&gt;
* Newsfeeds&lt;br /&gt;
* Redirect&lt;br /&gt;
* Search (decoupled in 4.x. Existing 3.x sites will still migrate it. However we recommend using Smart Search going forward. See Notes under Assess Each Extension)&lt;br /&gt;
* Smart Search&lt;br /&gt;
* Tags&lt;br /&gt;
* Weblinks (decoupled but your site may be using it and it will migrate. See Notes under Assess Each Extension.)&lt;br /&gt;
&lt;br /&gt;
== Step by Step ==&lt;br /&gt;
=== Set Up a Development Location ===&lt;br /&gt;
# Make sure you are running the latest Joomla 3.10.x version before proceeding.&lt;br /&gt;
# Take a backup of your live 3.10.x site. You can use a suggested tool (see the &#039;&#039;Suggested Tools&#039;&#039; at the bottom of page) or you can do this manually.&lt;br /&gt;
#*[[S:MyLanguage/Backup_Basics_for_a_Joomla!_Web_Site|Backup Basics for a Joomla! Web Site]]&lt;br /&gt;
#*[[S:MyLanguage/What_are_the_best_practices_for_site_backups%3F|What are the best practices for site backups?]]&lt;br /&gt;
# Make sure your environment meets the [https://downloads.joomla.org/technical-requirements technical requirements for Joomla 4].&lt;br /&gt;
# Create a new database and new user to restore your 3.10.x site to. &lt;br /&gt;
# Create a testing site or build area to work in and restore the backup copy of your 3.10.x site in one of the following places:&lt;br /&gt;
#* A subdomain.&lt;br /&gt;
#* A subdirectory.&lt;br /&gt;
#* A local device. Joomla has a detailed tutorial on installing [https://sourceforge.net/projects/xampp/ XAMPP] at [[XAMPP]]. However [https://www.wampserver.com/en/ WAMP], [https://www.mamp.info/en/windows/ MAMP], [https://sourceforge.net/projects/lampas/ LAMP] are all suitable alternatives.&lt;br /&gt;
#* A new hosting account on a temporary domain in the root. (If you would like to change hosts in the process of migration.)&lt;br /&gt;
#** Restoring a site on a local device. See [[S:MyLanguage/Installing Joomla locally|Installing Joomla locally]] and [[S:MyLanguage/Setting up your workstation for Joomla development|Setting up your workstation for Joomla development]].&lt;br /&gt;
#** Restoring a site with a tool listed at the bottom of the page. (Read the developer documentation.)&lt;br /&gt;
# In your test location, update your Joomla! 3.10.x instance to the latest maintenance release.&lt;br /&gt;
# Make sure you have the latest database schema updated to the latest version 3.10.x version by going to {{rarr|Extension Manager,Database}} tab. If your schema is not up to date as in the following image, click the &#039;&#039;&#039;Fix&#039;&#039;&#039; button:{{-}}[[File:J310-admin-extension-database-fix-en.png|border|800px]]&lt;br /&gt;
# Empty trash: Do you have any articles in the trash? Delete them (and any associated media if not in use elsewhere on the site). Articles (categories and menu items too) left in the trash can cause migration issues.&lt;br /&gt;
# Test.&lt;br /&gt;
# Backup again.&lt;br /&gt;
&lt;br /&gt;
=== Assess Each Extension ===&lt;br /&gt;
In your [[S:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x|planning]], you determined that third-party extensions were staying or going and how they migrate. For this portion of the Step by Step, you’ll be using two different sections of the site extensively; The Pre-Update Check in {{rarr|Components,Joomla! Update}} and {{rarr|Extensions,Manage,Manage}}. You are going to be looking at every single extension installed on your site. You will be determining if they need to be updated to the latest version or uninstalled. More details in [[Special:MyLanguage/:Pre-Update_Check|Pre-Update Check]].&lt;br /&gt;
# Using the &#039;&#039;&#039;Pre-Update Check&#039;&#039;&#039;: in order to use the Pre-Update Check, you will need to set the Joomla! Update component to Joomla 4. To do this follow:&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version (must be 3.10.x) and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:Migration_J3toJ4_update_channel-en.png|border|800px]]{{-}}&lt;br /&gt;
# Click Save &amp;amp; Close&lt;br /&gt;
# You will then see your Installed Joomla Version, the latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-admin-update_to_4-pre_update_check-en.png|border|800px]]{{amboxNew|image=notice|style=notice|title={{{title|Important Notice}}}|text=&#039;&#039;&#039;Do NOT update to Joomla! 4 right now. This is only to prepare your third-party extensions and get the site compatible with Joomla! 4.&#039;&#039;&#039;}}&lt;br /&gt;
# Look at the Pre-Update Check and the Extension Pre-Update Check in the Pre-Update Check tab of the Joomla Update component. If any extension that isn’t in your planning is listed here, add it to your list of extensions to investigate.&lt;br /&gt;
# If you migrated from Joomla! 2.5 to 3.x in the past, there may be some leftover extensions that need to be cleaned up. The following are older 2.5 or 3.x extensions that need to be uninstalled before updating to Joomla 4:&lt;br /&gt;
#;* plg_content_geshi&lt;br /&gt;
#;* PKG_JOOMLA &lt;br /&gt;
#;* Bluestork Administrator Template&lt;br /&gt;
#;* Beez_20&lt;br /&gt;
#;* Beez5&lt;br /&gt;
#;* Atomic&lt;br /&gt;
## When it comes to templates, uninstall all core Frontend or Backend templates except Protostar and Beez3 (site templates) and Isis or Hathor (Administrator templates). &#039;&#039;&#039;Note&#039;&#039;&#039; Protostar is &#039;&#039;&#039;not&#039;&#039;&#039; compatible with Joomla 4. Upon migration it will disappear. You&#039;ll need to have one template selected as &amp;quot;default&amp;quot; and you can use Protostar or Beez3. Protostar will disappear upon migration to Joomla 4.x.&lt;br /&gt;
## If you come across other files that need to be uninstalled, please add them to this page. This is a wiki so anyone can add to the page. Thank you in advance for your service.&lt;br /&gt;
# You will notice the tags for whether an extension is compatible or not. These tags generally tell a true story if they say No or Yes. If they say “Missing Compatibility Tag” it means that the extension developer didn’t use a tag in their extension so we don’t know if it is or isn’t compatible with Joomla 4. Talk to the developer to verify.&lt;br /&gt;
# &#039;&#039;&#039;Update Extensions&#039;&#039;&#039;: update any extensions that you will keep in your website. In Joomla! 3.10.x you can go to {{rarr|Extension Manager,Update tab}} and click &#039;&#039;&#039;Find Updates&#039;&#039;&#039; that will add a tooltip in the Version column, under the Manage tab, giving some compatibility information from the Backend. This functionality only supports extensions that update via the Extension Manager Update tab. If you have extensions installed that do not use the Joomla extension update they need to be assessed manually as detailed below. The same goes for those extensions that have a tooltip. You will still need to check the type of package and migration path with the extension developer to verify how to upgrade/migrate.&lt;br /&gt;
# Investigate and Uninstall Extensions Extensions: go to {{rarr|Extension Manager,Manage}}&lt;br /&gt;
# Click the Button &#039;&#039;Search Tools&#039;&#039; to show the filter options&lt;br /&gt;
# Select Package from the &#039;&#039;Select Type&#039;&#039; drop-down.{{-}}[[File:J310-admin-extension-manage-package-en.png|800px]]{{-}}{{note|Selecting Package first is recommended because if there is something you need to uninstall in a package, it will automatically uninstall the associated Modules, Plugins, or anything else in the package at one time.}}&lt;br /&gt;
# Uninstall any Packages that are no longer needed or will not be migrating to Joomla 4.&lt;br /&gt;
# Repeat this process of going through the Manage tab for all Types in the drop-down: Component, File, Language, Library, Module, Plugin and Template. If the Author states Joomla! Project, then leave those extensions alone. For all others, make sure that you uninstall those not in use or not compatible with Joomla!&amp;amp;nbsp;4.x.{{-}}{{note|&#039;&#039;&#039;NOTE!&#039;&#039;&#039; You will not be able to uninstall any template that is set as default. Select a Core supported template such as Beez3 or Protostar and then uninstall the template if you need to do so. &amp;lt;br /&amp;gt;&#039;&#039;Another reminder:&#039;&#039; &#039;&#039;&#039;Protostar is not compatible with Joomla 4.x&#039;&#039;&#039;. Upon migration it will disappear. Selecting it as default simply gets you to Joomla 4.x.|type=serious}}&lt;br /&gt;
# Make a note of any versions of Packages and Components currently running that you will be keeping on your site. You can copy/paste them into a document for reference.&lt;br /&gt;
# For any extensions you are keeping but don&#039;t use the Extension Manager to one-click update ({{rarr|Extensions,Manage,Update}}) update all extensions to the latest versions.&lt;br /&gt;
# Before and as you update, note if the extensions have both 3.10.x &amp;amp; 4.x versions in the same package. If so, they will be fine to &amp;quot;one-click update.&amp;quot; If not, and 3.10 and 4.x have different packages, look at them case by case. They will normally fall into one of the following scenarios:&lt;br /&gt;
#* The extension has separate packages but upon upgrading to 4.x, they automatically detect this and still work. Make sure the developer confirms this.&lt;br /&gt;
#* The extension has separate packages that need to be uninstalled in 3.10.x and then installed with the Joomla 4.x version once the site is migrated. An example of this might be a content plugin. It is simple to uninstall it in 3.10.x and then install it again in 4.x.&lt;br /&gt;
#* See [[S:MyLanguage/Template_Considerations_During_Migration|Template Considerations]] for more specific information on templates and [[S:MyLanguage/J3.x:Converting_A_Previous_Joomla!_Version_Template|Converting a previous Joomla! Version template]]&lt;br /&gt;
&lt;br /&gt;
==== Notes on Search (com_search) ====&lt;br /&gt;
Search (com_search) will be decoupled in Joomla 4.x. Search (com_search) will migrate to Joomla 4. After migration, you&#039;ll need to update it to the Joomla 4.x version via com_installer. It will continue to be maintained, but more the same way a third-party extension is by receiving updates via com_installer. It is recommended to use Smart Search (com_finder) going forward. Search will still be available at https://extensions.joomla.org/category/official-extensions/.&lt;br /&gt;
&lt;br /&gt;
==== Notes on Weblinks ====&lt;br /&gt;
Weblinks was decoupled back in Joomla 3.4. If it was in use on a 2.5 site, the migration process would note this and migrate the Weblinks component and data. For the migration from 3.10.x to 4.x, it will be the same. It is still available and maintained on the JED at [https://extensions.joomla.org/category/official-extensions/ Official Extensions].&lt;br /&gt;
&lt;br /&gt;
==== Notes on Legacy Routing ==== &lt;br /&gt;
Legacy routing will not be available in Joomla 4.x. Only Modern will be available. When you do the migration, if you are using Legacy routing, the system will automatically change them to Modern routing. You will want to run a broken link checker on your site after migrating to Joomla 4.x and &#039;&#039;before you go live&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Going to Joomla! 4.x ===&lt;br /&gt;
Once you have either updated or uninstalled your third-party extensions so that only those compatible with Joomla! 4 remain in your installation, continue with the following steps:&lt;br /&gt;
# Go to {{rarr|System,Global Configuration,Server tab}} and turn Error Reporting from System Default to Maximum. Make sure to Save &amp;amp; Close.{{-}} [[File:J310-system-global-config-server-tab-en.png|border|500px]]&lt;br /&gt;
# Take another backup.&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:J310-component-joomla-update-select-support-en.png|border|500px]]&lt;br /&gt;
# Click Save &amp;amp; Close.&lt;br /&gt;
# You will then see your Installed Joomla Version, the Latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-to-j4-dev-update-found-en.png|border|800px]]&lt;br /&gt;
# If the update is not showing up, go to {{rarr|Extensions,Update}} and select Clear Cache from the toolbar. Now the update to Joomla! 4 should show up.&lt;br /&gt;
# Cross your fingers, and make sure you have that backup available in case.&lt;br /&gt;
# Click the Install the Update button.&lt;br /&gt;
# Make tea whilst the status bar loads to fully green. The amount of time this takes is dependent on your site, internet connection and server speed. The process can take several minutes. There are over 12,000 files comprising 75 megabytes to be extracted. When the update is finished, you might be logged out of the Administrator. Sign in again, if necessary&lt;br /&gt;
# If all goes well, you will get to a totally new look to the Backend panel.{{-}}[[File:j4-administrator-overview-en.png|border|800px]]&lt;br /&gt;
# Go to {{rarr|System,Maintenance,Database}} and click &#039;&#039;Fix&#039;&#039; if any errors show.&lt;br /&gt;
# In {{rarr|System,Install,Discover}} see if there are any extensions to install. (There shouldn&#039;t be any!)&lt;br /&gt;
# Go to the Frontend of your site and see if it shows up even if it’s not the right template. If so, continue. If not, see [[S:MyLanguage/Joomla 3.10 to 4.x Common Migration Errors|common errors during migration]].&lt;br /&gt;
# Take a backup.&lt;br /&gt;
# Install your new template or other extensions if you have them to install. Back up often.&lt;br /&gt;
# Configure them. Back up often.&lt;br /&gt;
# Run a broken link checker and fix any broken links.&lt;br /&gt;
# Test everything. Back up often.&lt;br /&gt;
# If everything works as expected, turn Error Reporting back to System Default ({{rarr|System,Global Configuration,Server tab}}). Make sure to Save &amp;amp; Close.&lt;br /&gt;
# Be sure to read the post-installation messages.&lt;br /&gt;
=== Going Live with Your Joomla! 4.x Site ===&lt;br /&gt;
# When you’re ready to go live, back up your 3.10 site for the last time. Restore it in a subdirectory or subdomain if you would like to.&lt;br /&gt;
# Back up your Joomla! 4.x site and move or restore your Joomla! 4.x site to the root (or change nameservers if you were building on a temporary domain at a new hosting account root).&lt;br /&gt;
# Test again.&lt;br /&gt;
# &#039;&#039;&#039;If&#039;&#039;&#039; you have made security changes to &#039;&#039;.htaccess&#039;&#039; file in the past, you may need to change a line (or lines) in it to update to Joomla 4. Please go to [https://docs.joomla.org/Htaccess_changes_after_joomla4.0.4 Htaccess changes after joomla4.0.4] to determine if you need to change your file. &lt;br /&gt;
# Remove the Joomla! 3.10 site from the server within a couple of days unless you have edited your &#039;&#039;robots.txt&#039;&#039; file to block the search engine spiders and disabled the Frontend of the site.&lt;br /&gt;
# Remove all development sites you have been working with or keep them up-to-date if they are running a current version in order to ward off hack attempts on your server. &lt;br /&gt;
&lt;br /&gt;
If you had data change on the 3.10 site while you were migrating to 4.x, you will want to get that data moved over to the 4.x site before going live. You can do this manually (make sure you keep the same user IDs - go in order) or by using a [https://extensions.joomla.org/category/migration-a-conversion/data-import-a-export%20transfer%20tool/third-party%20extension/ third party extension].&lt;br /&gt;
&lt;br /&gt;
== Suggested Tools ==&lt;br /&gt;
* [http://extensions.joomla.org/extensions/access-a-security/site-security/backup/1606 Akeeba Backup] is popular for backup and restore. See more [https://extensions.joomla.org/tags/backup/ backup tools].&lt;br /&gt;
==Related information== &lt;br /&gt;
[[Special:MyLanguage/:Pre-Update_Check|Pre-Update_Check]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/1/zh-tw&amp;diff=1033657</id>
		<title>Translations:Joomla 3.x to 4.x Step by Step Migration/1/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/1/zh-tw&amp;diff=1033657"/>
		<updated>2025-01-07T01:11:39Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;本指南假設您從 Joomla 3.10.x 開始。如果您使用的是早期版本，請務必先升級到 Joomla 3.10，然後再升級到 Joomla 4。&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本指南假設您從 Joomla 3.10.x 開始。如果您使用的是早期版本，請務必先升級到 Joomla 3.10，然後再升級到 Joomla 4。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033656</id>
		<title>Joomla 3.x to 4.x Step by Step Migration/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla_3.x_to_4.x_Step_by_Step_Migration/zh-tw&amp;diff=1033656"/>
		<updated>2025-01-07T01:11:09Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;警告！&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{version|3.10,4.x}}&lt;br /&gt;
{{warning|title=警告！|This guide assumes you are starting on Joomla 3.10.x. If you are on a earlier version make sure you upgrade to Joomla 3.10 first before moving to Joomla 4. &lt;br /&gt;
&lt;br /&gt;
There is no rush. Make sure all your extensions are ready for Joomla 4.x. Joomla 3.10.x will be supported until 16 August 2023.}}&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step instructions to migrate your 3.10.x site to Joomla! 4.x. While there are different scenarios, this will give you the basic procedure to follow. Complex migrations will likely be a result of installed third-party extensions. You are encouraged to contact the developers of third-party extensions installed on your Joomla site for their suggested migration path.&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
The migration from Joomla! 3.10.x to 4.x is considered a mini-migration. This is because the Joomla core extensions will upgrade with a “one-click” upgrade via the Joomla! Update component in the Backend (Administrator) of Joomla. Many third-party extensions are a one-click upgrade too. Some are not. Look at each one and determine what path the extension needs to follow to get from 3.10 to 4.x. If you haven&#039;t already, read the [[S:MyLanguage/Migration Step by Step Self Assessment|Self Assessment]] and [[S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for 3.10 to 4.x Migration]] prior to following the steps below.&lt;br /&gt;
&amp;lt;/br&amp;gt;Joomla! Core Extensions are:&lt;br /&gt;
* Categories&lt;br /&gt;
* Articles&lt;br /&gt;
* Menus&lt;br /&gt;
* Modules (core modules - not third-party)&lt;br /&gt;
* Action Logs&lt;br /&gt;
* Banners&lt;br /&gt;
* Fields&lt;br /&gt;
* Content History&lt;br /&gt;
* Contacts&lt;br /&gt;
* Messaging&lt;br /&gt;
* Newsfeeds&lt;br /&gt;
* Redirect&lt;br /&gt;
* Search (decoupled in 4.x. Existing 3.x sites will still migrate it. However we recommend using Smart Search going forward. See Notes under Assess Each Extension)&lt;br /&gt;
* Smart Search&lt;br /&gt;
* Tags&lt;br /&gt;
* Weblinks (decoupled but your site may be using it and it will migrate. See Notes under Assess Each Extension.)&lt;br /&gt;
&lt;br /&gt;
== Step by Step ==&lt;br /&gt;
=== Set Up a Development Location ===&lt;br /&gt;
# Make sure you are running the latest Joomla 3.10.x version before proceeding.&lt;br /&gt;
# Take a backup of your live 3.10.x site. You can use a suggested tool (see the &#039;&#039;Suggested Tools&#039;&#039; at the bottom of page) or you can do this manually.&lt;br /&gt;
#*[[S:MyLanguage/Backup_Basics_for_a_Joomla!_Web_Site|Backup Basics for a Joomla! Web Site]]&lt;br /&gt;
#*[[S:MyLanguage/What_are_the_best_practices_for_site_backups%3F|What are the best practices for site backups?]]&lt;br /&gt;
# Make sure your environment meets the [https://downloads.joomla.org/technical-requirements technical requirements for Joomla 4].&lt;br /&gt;
# Create a new database and new user to restore your 3.10.x site to. &lt;br /&gt;
# Create a testing site or build area to work in and restore the backup copy of your 3.10.x site in one of the following places:&lt;br /&gt;
#* A subdomain.&lt;br /&gt;
#* A subdirectory.&lt;br /&gt;
#* A local device. Joomla has a detailed tutorial on installing [https://sourceforge.net/projects/xampp/ XAMPP] at [[XAMPP]]. However [https://www.wampserver.com/en/ WAMP], [https://www.mamp.info/en/windows/ MAMP], [https://sourceforge.net/projects/lampas/ LAMP] are all suitable alternatives.&lt;br /&gt;
#* A new hosting account on a temporary domain in the root. (If you would like to change hosts in the process of migration.)&lt;br /&gt;
#** Restoring a site on a local device. See [[S:MyLanguage/Installing Joomla locally|Installing Joomla locally]] and [[S:MyLanguage/Setting up your workstation for Joomla development|Setting up your workstation for Joomla development]].&lt;br /&gt;
#** Restoring a site with a tool listed at the bottom of the page. (Read the developer documentation.)&lt;br /&gt;
# In your test location, update your Joomla! 3.10.x instance to the latest maintenance release.&lt;br /&gt;
# Make sure you have the latest database schema updated to the latest version 3.10.x version by going to {{rarr|Extension Manager,Database}} tab. If your schema is not up to date as in the following image, click the &#039;&#039;&#039;Fix&#039;&#039;&#039; button:{{-}}[[File:J310-admin-extension-database-fix-en.png|border|800px]]&lt;br /&gt;
# Empty trash: Do you have any articles in the trash? Delete them (and any associated media if not in use elsewhere on the site). Articles (categories and menu items too) left in the trash can cause migration issues.&lt;br /&gt;
# Test.&lt;br /&gt;
# Backup again.&lt;br /&gt;
&lt;br /&gt;
=== Assess Each Extension ===&lt;br /&gt;
In your [[S:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x|planning]], you determined that third-party extensions were staying or going and how they migrate. For this portion of the Step by Step, you’ll be using two different sections of the site extensively; The Pre-Update Check in {{rarr|Components,Joomla! Update}} and {{rarr|Extensions,Manage,Manage}}. You are going to be looking at every single extension installed on your site. You will be determining if they need to be updated to the latest version or uninstalled. More details in [[Special:MyLanguage/:Pre-Update_Check|Pre-Update Check]].&lt;br /&gt;
# Using the &#039;&#039;&#039;Pre-Update Check&#039;&#039;&#039;: in order to use the Pre-Update Check, you will need to set the Joomla! Update component to Joomla 4. To do this follow:&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version (must be 3.10.x) and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:Migration_J3toJ4_update_channel-en.png|border|800px]]{{-}}&lt;br /&gt;
# Click Save &amp;amp; Close&lt;br /&gt;
# You will then see your Installed Joomla Version, the latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-admin-update_to_4-pre_update_check-en.png|border|800px]]{{amboxNew|image=notice|style=notice|title={{{title|Important Notice}}}|text=&#039;&#039;&#039;Do NOT update to Joomla! 4 right now. This is only to prepare your third-party extensions and get the site compatible with Joomla! 4.&#039;&#039;&#039;}}&lt;br /&gt;
# Look at the Pre-Update Check and the Extension Pre-Update Check in the Pre-Update Check tab of the Joomla Update component. If any extension that isn’t in your planning is listed here, add it to your list of extensions to investigate.&lt;br /&gt;
# If you migrated from Joomla! 2.5 to 3.x in the past, there may be some leftover extensions that need to be cleaned up. The following are older 2.5 or 3.x extensions that need to be uninstalled before updating to Joomla 4:&lt;br /&gt;
#;* plg_content_geshi&lt;br /&gt;
#;* PKG_JOOMLA &lt;br /&gt;
#;* Bluestork Administrator Template&lt;br /&gt;
#;* Beez_20&lt;br /&gt;
#;* Beez5&lt;br /&gt;
#;* Atomic&lt;br /&gt;
## When it comes to templates, uninstall all core Frontend or Backend templates except Protostar and Beez3 (site templates) and Isis or Hathor (Administrator templates). &#039;&#039;&#039;Note&#039;&#039;&#039; Protostar is &#039;&#039;&#039;not&#039;&#039;&#039; compatible with Joomla 4. Upon migration it will disappear. You&#039;ll need to have one template selected as &amp;quot;default&amp;quot; and you can use Protostar or Beez3. Protostar will disappear upon migration to Joomla 4.x.&lt;br /&gt;
## If you come across other files that need to be uninstalled, please add them to this page. This is a wiki so anyone can add to the page. Thank you in advance for your service.&lt;br /&gt;
# You will notice the tags for whether an extension is compatible or not. These tags generally tell a true story if they say No or Yes. If they say “Missing Compatibility Tag” it means that the extension developer didn’t use a tag in their extension so we don’t know if it is or isn’t compatible with Joomla 4. Talk to the developer to verify.&lt;br /&gt;
# &#039;&#039;&#039;Update Extensions&#039;&#039;&#039;: update any extensions that you will keep in your website. In Joomla! 3.10.x you can go to {{rarr|Extension Manager,Update tab}} and click &#039;&#039;&#039;Find Updates&#039;&#039;&#039; that will add a tooltip in the Version column, under the Manage tab, giving some compatibility information from the Backend. This functionality only supports extensions that update via the Extension Manager Update tab. If you have extensions installed that do not use the Joomla extension update they need to be assessed manually as detailed below. The same goes for those extensions that have a tooltip. You will still need to check the type of package and migration path with the extension developer to verify how to upgrade/migrate.&lt;br /&gt;
# Investigate and Uninstall Extensions Extensions: go to {{rarr|Extension Manager,Manage}}&lt;br /&gt;
# Click the Button &#039;&#039;Search Tools&#039;&#039; to show the filter options&lt;br /&gt;
# Select Package from the &#039;&#039;Select Type&#039;&#039; drop-down.{{-}}[[File:J310-admin-extension-manage-package-en.png|800px]]{{-}}{{note|Selecting Package first is recommended because if there is something you need to uninstall in a package, it will automatically uninstall the associated Modules, Plugins, or anything else in the package at one time.}}&lt;br /&gt;
# Uninstall any Packages that are no longer needed or will not be migrating to Joomla 4.&lt;br /&gt;
# Repeat this process of going through the Manage tab for all Types in the drop-down: Component, File, Language, Library, Module, Plugin and Template. If the Author states Joomla! Project, then leave those extensions alone. For all others, make sure that you uninstall those not in use or not compatible with Joomla!&amp;amp;nbsp;4.x.{{-}}{{note|&#039;&#039;&#039;NOTE!&#039;&#039;&#039; You will not be able to uninstall any template that is set as default. Select a Core supported template such as Beez3 or Protostar and then uninstall the template if you need to do so. &amp;lt;br /&amp;gt;&#039;&#039;Another reminder:&#039;&#039; &#039;&#039;&#039;Protostar is not compatible with Joomla 4.x&#039;&#039;&#039;. Upon migration it will disappear. Selecting it as default simply gets you to Joomla 4.x.|type=serious}}&lt;br /&gt;
# Make a note of any versions of Packages and Components currently running that you will be keeping on your site. You can copy/paste them into a document for reference.&lt;br /&gt;
# For any extensions you are keeping but don&#039;t use the Extension Manager to one-click update ({{rarr|Extensions,Manage,Update}}) update all extensions to the latest versions.&lt;br /&gt;
# Before and as you update, note if the extensions have both 3.10.x &amp;amp; 4.x versions in the same package. If so, they will be fine to &amp;quot;one-click update.&amp;quot; If not, and 3.10 and 4.x have different packages, look at them case by case. They will normally fall into one of the following scenarios:&lt;br /&gt;
#* The extension has separate packages but upon upgrading to 4.x, they automatically detect this and still work. Make sure the developer confirms this.&lt;br /&gt;
#* The extension has separate packages that need to be uninstalled in 3.10.x and then installed with the Joomla 4.x version once the site is migrated. An example of this might be a content plugin. It is simple to uninstall it in 3.10.x and then install it again in 4.x.&lt;br /&gt;
#* See [[S:MyLanguage/Template_Considerations_During_Migration|Template Considerations]] for more specific information on templates and [[S:MyLanguage/J3.x:Converting_A_Previous_Joomla!_Version_Template|Converting a previous Joomla! Version template]]&lt;br /&gt;
&lt;br /&gt;
==== Notes on Search (com_search) ====&lt;br /&gt;
Search (com_search) will be decoupled in Joomla 4.x. Search (com_search) will migrate to Joomla 4. After migration, you&#039;ll need to update it to the Joomla 4.x version via com_installer. It will continue to be maintained, but more the same way a third-party extension is by receiving updates via com_installer. It is recommended to use Smart Search (com_finder) going forward. Search will still be available at https://extensions.joomla.org/category/official-extensions/.&lt;br /&gt;
&lt;br /&gt;
==== Notes on Weblinks ====&lt;br /&gt;
Weblinks was decoupled back in Joomla 3.4. If it was in use on a 2.5 site, the migration process would note this and migrate the Weblinks component and data. For the migration from 3.10.x to 4.x, it will be the same. It is still available and maintained on the JED at [https://extensions.joomla.org/category/official-extensions/ Official Extensions].&lt;br /&gt;
&lt;br /&gt;
==== Notes on Legacy Routing ==== &lt;br /&gt;
Legacy routing will not be available in Joomla 4.x. Only Modern will be available. When you do the migration, if you are using Legacy routing, the system will automatically change them to Modern routing. You will want to run a broken link checker on your site after migrating to Joomla 4.x and &#039;&#039;before you go live&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Going to Joomla! 4.x ===&lt;br /&gt;
Once you have either updated or uninstalled your third-party extensions so that only those compatible with Joomla! 4 remain in your installation, continue with the following steps:&lt;br /&gt;
# Go to {{rarr|System,Global Configuration,Server tab}} and turn Error Reporting from System Default to Maximum. Make sure to Save &amp;amp; Close.{{-}} [[File:J310-system-global-config-server-tab-en.png|border|500px]]&lt;br /&gt;
# Take another backup.&lt;br /&gt;
# Go to {{rarr|Components,Joomla Update}}. (It should say no updates found. If it doesn’t, update Joomla to the latest version and test. Then do another backup.) Click on the Options button at the top right corner.&lt;br /&gt;
# Select &#039;&#039;Joomla Next&#039;&#039; from the drop-down for Update Channel.{{-}}[[File:J310-component-joomla-update-select-support-en.png|border|500px]]&lt;br /&gt;
# Click Save &amp;amp; Close.&lt;br /&gt;
# You will then see your Installed Joomla Version, the Latest Joomla! version and the URL for the update package. Joomla will show you the requirements again for Joomla 4. If it flags that you have either an incompatible system or extensions it will tell you here. Take a moment to review this page.{{-}}[[File:J310-to-j4-dev-update-found-en.png|border|800px]]&lt;br /&gt;
# If the update is not showing up, go to {{rarr|Extensions,Update}} and select Clear Cache from the toolbar. Now the update to Joomla! 4 should show up.&lt;br /&gt;
# Cross your fingers, and make sure you have that backup available in case.&lt;br /&gt;
# Click the Install the Update button.&lt;br /&gt;
# Make tea whilst the status bar loads to fully green. The amount of time this takes is dependent on your site, internet connection and server speed. The process can take several minutes. There are over 12,000 files comprising 75 megabytes to be extracted. When the update is finished, you might be logged out of the Administrator. Sign in again, if necessary&lt;br /&gt;
# If all goes well, you will get to a totally new look to the Backend panel.{{-}}[[File:j4-administrator-overview-en.png|border|800px]]&lt;br /&gt;
# Go to {{rarr|System,Maintenance,Database}} and click &#039;&#039;Fix&#039;&#039; if any errors show.&lt;br /&gt;
# In {{rarr|System,Install,Discover}} see if there are any extensions to install. (There shouldn&#039;t be any!)&lt;br /&gt;
# Go to the Frontend of your site and see if it shows up even if it’s not the right template. If so, continue. If not, see [[S:MyLanguage/Joomla 3.10 to 4.x Common Migration Errors|common errors during migration]].&lt;br /&gt;
# Take a backup.&lt;br /&gt;
# Install your new template or other extensions if you have them to install. Back up often.&lt;br /&gt;
# Configure them. Back up often.&lt;br /&gt;
# Run a broken link checker and fix any broken links.&lt;br /&gt;
# Test everything. Back up often.&lt;br /&gt;
# If everything works as expected, turn Error Reporting back to System Default ({{rarr|System,Global Configuration,Server tab}}). Make sure to Save &amp;amp; Close.&lt;br /&gt;
# Be sure to read the post-installation messages.&lt;br /&gt;
=== Going Live with Your Joomla! 4.x Site ===&lt;br /&gt;
# When you’re ready to go live, back up your 3.10 site for the last time. Restore it in a subdirectory or subdomain if you would like to.&lt;br /&gt;
# Back up your Joomla! 4.x site and move or restore your Joomla! 4.x site to the root (or change nameservers if you were building on a temporary domain at a new hosting account root).&lt;br /&gt;
# Test again.&lt;br /&gt;
# &#039;&#039;&#039;If&#039;&#039;&#039; you have made security changes to &#039;&#039;.htaccess&#039;&#039; file in the past, you may need to change a line (or lines) in it to update to Joomla 4. Please go to [https://docs.joomla.org/Htaccess_changes_after_joomla4.0.4 Htaccess changes after joomla4.0.4] to determine if you need to change your file. &lt;br /&gt;
# Remove the Joomla! 3.10 site from the server within a couple of days unless you have edited your &#039;&#039;robots.txt&#039;&#039; file to block the search engine spiders and disabled the Frontend of the site.&lt;br /&gt;
# Remove all development sites you have been working with or keep them up-to-date if they are running a current version in order to ward off hack attempts on your server. &lt;br /&gt;
&lt;br /&gt;
If you had data change on the 3.10 site while you were migrating to 4.x, you will want to get that data moved over to the 4.x site before going live. You can do this manually (make sure you keep the same user IDs - go in order) or by using a [https://extensions.joomla.org/category/migration-a-conversion/data-import-a-export%20transfer%20tool/third-party%20extension/ third party extension].&lt;br /&gt;
&lt;br /&gt;
== Suggested Tools ==&lt;br /&gt;
* [http://extensions.joomla.org/extensions/access-a-security/site-security/backup/1606 Akeeba Backup] is popular for backup and restore. See more [https://extensions.joomla.org/tags/backup/ backup tools].&lt;br /&gt;
==Related information== &lt;br /&gt;
[[Special:MyLanguage/:Pre-Update_Check|Pre-Update_Check]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 4.x{{#translation:}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/34/zh-tw&amp;diff=1033655</id>
		<title>Translations:Joomla 3.x to 4.x Step by Step Migration/34/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Joomla_3.x_to_4.x_Step_by_Step_Migration/34/zh-tw&amp;diff=1033655"/>
		<updated>2025-01-07T01:11:08Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;警告！&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;警告！&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/zh-tw&amp;diff=1033623</id>
		<title>Planning for Mini-Migration - Joomla 3.10.x to 4.x/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/zh-tw&amp;diff=1033623"/>
		<updated>2025-01-04T06:45:51Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;#如果您重新設計或更改網站設計或導航，是否會有過時的頁面需要重定向？如果是，請記錄它們。電子表格有助於記錄需要更改的鏈...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
從Joomla 3.10.x 移植到 {{JVer|4.x}} 4.x 算做是迷你移轉或是小規模移轉。這代表說Joomla 核心擴充套件可以用「一鍵升級」的方式來完成，但是第三方擴充套件就不能一概而論，需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
== 導覽 ==&lt;br /&gt;
移轉是重新整理大好時機，可以清除不需要的內容，並開發您網站需要的新功能或是元素。儘可能妥善地發展想法並規劃，讓成果發揮到極致。謹記規劃、規劃、再規劃。良好的規劃有助於執行。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
規劃的初步，先讓自己回答以下的問題，或是執行下列的任務。依據您網站的複雜程度，您可能會需要有更多需要在規劃階段考慮的項目。不幸的是，我們無法羅列出所有可能的情境。到時候我們會架設一個論壇，專門給 Joomla 4.x 移轉用，類似於之前我們為每一個主要版本 Joomla 所規劃的。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 3.10.x 橋接 ==&lt;br /&gt;
{{JVer|3.10}}.x  版本是作為Joomla 3 以及 {{JVer|4}} 產品生命週期之前的橋樑。{{JVer|3.10}}.x 版本發佈主要是為了包含Joomla 4.x更改的 API 向後移植(backports) 開發分支，以協助並減輕社群夥伴們開發下一個主要版本用。&lt;br /&gt;
 {{JVer|3.10}}.x  有個優異的新功能， Joomla! Update 元件，可以協助您檢查您的迷你搬移程序 : [[S:MyLanguage/Pre-Update Check|升級前檢查事項]]&lt;br /&gt;
一旦您的網站升級到3.10，更新前檢查可以協助您確認您的PHP以及SQL選項、設定、以及您使用中的擴充套件相容於Joomla 4.0，使用目標平台(targetplatform) 標記。更多細節請見 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 文件。&lt;br /&gt;
&lt;br /&gt;
== 規劃要採取的行動 ==&lt;br /&gt;
下文假設您已經將您的 Joomla 3.x 網站升級到 3.10.x。這會讓您可以使用升級前檢查，有助於您執行規劃。&lt;br /&gt;
#確認您的網站正執行 3.10.x 版本&lt;br /&gt;
#確認您原本的網站目標。移轉是一個好機會，可以重新對焦您的網站目標，或是設定新的方向。&lt;br /&gt;
#您的伺服器是否符合Joomla! 4 的最低水準 [https://www.joomla.org/about-joomla/technical-requirements.html 技術需求] ？如果沒有，您會需要更換主機。再也沒有比這更好的機會做這件事情了。&lt;br /&gt;
#您將會使用什麼環境來開發？是在您的本機進行開發嗎？是在您的伺服器上設置子網域來進行開發嗎？是否有符合需求的伺服器/主機帳號？&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
#列下正在使用的第三方擴充套件，包含元件、模組、插件、語言以及佈景主題。您可以使用 [https://docs.joomla.org/images/7/7a/3to4-Third-Party_Extension_Checklist_Inventory_Sheet.pdf 第三方擴充套件庫存清查] 或是複製/貼上到文件來當做參考，要用筆紙來手寫筆記也是可以的啦！可以的話順便記錄下，這些套件使用的頻率，重度使用、中度，沒什麼用，還是根本沒用過？&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
#確認您依賴的第三方擴充套件是否已準備好遷移到您要遷移的 Joomla 版本。在 Joomla 更新元件中選擇「Joomla 下一步」選項（一旦運行 Joomla 3.10.x），並檢查它們是否顯示與 Joomla 4 的相容性。不要運行更新到 4.x，只需在 Joomla 更新選項中選擇「Joomla 下一步」，以便顯示「更新前檢查器」。這將幫助您獲得正在使用的擴充套件及其相容性的摘要視圖。它不能替代仍然需要使用「擴充套件」→「管理」。有關更多信息，請參閱分步指南和 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 元件的文件。這只是為了準備哪些第三方擴充套件將保留、刪除或替換。&lt;br /&gt;
#評估您是否真的需要所有正在使用的擴充套件。Joomla 4 是否內建了可以取代第三方擴充套件的功能？&lt;br /&gt;
#檢視您的分類和文章。有沒有需要清理文章內容的地方？不需要的內容就不用移轉了。&lt;br /&gt;
#您的佈景主題如何呢？假如您從第三方購買佈景主題，他們是否有發佈相容 4.x 的版本？那你有想要繼續使用這個佈景主題嗎？開發者是否有發佈更新路徑？新版本是否具備響應式？您使用的是客製化佈景嗎？或是您使用的，是重度客製了第三方佈景主題？ Joomla 核心佈景主題&#039;&#039;&#039;Protostar 並不相容於 Joomla 4&#039;&#039;&#039;。經過移轉後他會消失。您可以考慮使用 Joomla 4.x 的核心佈景主題 Cassiopeia. For an expansion of Template based considerations，請見 [[S:MyLanguage/Template_Considerations_During_Migration|移轉時佈景主題需要考慮的項目]]。&lt;br /&gt;
#如果您要替換模板，是否需要任何新圖像？例如，如果您的當前網站具有白色背景，並且您的徽標或其他圖像為具有白色背景的 .jpg 檔案，那麼在具有米白色或彩色背景的新模板下，它們的外觀將不會很好。&lt;br /&gt;
#如果您重新設計或更改網站設計或導航，是否會有過時的頁面需要重定向？如果是，請記錄它們。電子表格有助於記錄需要更改的鏈接。&lt;br /&gt;
&lt;br /&gt;
{{Basic button|S:MyLanguage/Joomla 3.x to 4.x Step by Step Migration|一步步將 Joomla 3.10 遷移（Migration）至 4.x|class=expand}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/21/zh-tw&amp;diff=1033622</id>
		<title>Translations:Planning for Mini-Migration - Joomla 3.10.x to 4.x/21/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/21/zh-tw&amp;diff=1033622"/>
		<updated>2025-01-04T06:45:50Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;#如果您重新設計或更改網站設計或導航，是否會有過時的頁面需要重定向？如果是，請記錄它們。電子表格有助於記錄需要更改的鏈...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#如果您重新設計或更改網站設計或導航，是否會有過時的頁面需要重定向？如果是，請記錄它們。電子表格有助於記錄需要更改的鏈接。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/zh-tw&amp;diff=1033621</id>
		<title>Planning for Mini-Migration - Joomla 3.10.x to 4.x/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/zh-tw&amp;diff=1033621"/>
		<updated>2025-01-04T06:45:39Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
從Joomla 3.10.x 移植到 {{JVer|4.x}} 4.x 算做是迷你移轉或是小規模移轉。這代表說Joomla 核心擴充套件可以用「一鍵升級」的方式來完成，但是第三方擴充套件就不能一概而論，需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
== 導覽 ==&lt;br /&gt;
移轉是重新整理大好時機，可以清除不需要的內容，並開發您網站需要的新功能或是元素。儘可能妥善地發展想法並規劃，讓成果發揮到極致。謹記規劃、規劃、再規劃。良好的規劃有助於執行。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
規劃的初步，先讓自己回答以下的問題，或是執行下列的任務。依據您網站的複雜程度，您可能會需要有更多需要在規劃階段考慮的項目。不幸的是，我們無法羅列出所有可能的情境。到時候我們會架設一個論壇，專門給 Joomla 4.x 移轉用，類似於之前我們為每一個主要版本 Joomla 所規劃的。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 3.10.x 橋接 ==&lt;br /&gt;
{{JVer|3.10}}.x  版本是作為Joomla 3 以及 {{JVer|4}} 產品生命週期之前的橋樑。{{JVer|3.10}}.x 版本發佈主要是為了包含Joomla 4.x更改的 API 向後移植(backports) 開發分支，以協助並減輕社群夥伴們開發下一個主要版本用。&lt;br /&gt;
 {{JVer|3.10}}.x  有個優異的新功能， Joomla! Update 元件，可以協助您檢查您的迷你搬移程序 : [[S:MyLanguage/Pre-Update Check|升級前檢查事項]]&lt;br /&gt;
一旦您的網站升級到3.10，更新前檢查可以協助您確認您的PHP以及SQL選項、設定、以及您使用中的擴充套件相容於Joomla 4.0，使用目標平台(targetplatform) 標記。更多細節請見 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 文件。&lt;br /&gt;
&lt;br /&gt;
== 規劃要採取的行動 ==&lt;br /&gt;
下文假設您已經將您的 Joomla 3.x 網站升級到 3.10.x。這會讓您可以使用升級前檢查，有助於您執行規劃。&lt;br /&gt;
#確認您的網站正執行 3.10.x 版本&lt;br /&gt;
#確認您原本的網站目標。移轉是一個好機會，可以重新對焦您的網站目標，或是設定新的方向。&lt;br /&gt;
#您的伺服器是否符合Joomla! 4 的最低水準 [https://www.joomla.org/about-joomla/technical-requirements.html 技術需求] ？如果沒有，您會需要更換主機。再也沒有比這更好的機會做這件事情了。&lt;br /&gt;
#您將會使用什麼環境來開發？是在您的本機進行開發嗎？是在您的伺服器上設置子網域來進行開發嗎？是否有符合需求的伺服器/主機帳號？&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
#列下正在使用的第三方擴充套件，包含元件、模組、插件、語言以及佈景主題。您可以使用 [https://docs.joomla.org/images/7/7a/3to4-Third-Party_Extension_Checklist_Inventory_Sheet.pdf 第三方擴充套件庫存清查] 或是複製/貼上到文件來當做參考，要用筆紙來手寫筆記也是可以的啦！可以的話順便記錄下，這些套件使用的頻率，重度使用、中度，沒什麼用，還是根本沒用過？&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
#確認您依賴的第三方擴充套件是否已準備好遷移到您要遷移的 Joomla 版本。在 Joomla 更新元件中選擇「Joomla 下一步」選項（一旦運行 Joomla 3.10.x），並檢查它們是否顯示與 Joomla 4 的相容性。不要運行更新到 4.x，只需在 Joomla 更新選項中選擇「Joomla 下一步」，以便顯示「更新前檢查器」。這將幫助您獲得正在使用的擴充套件及其相容性的摘要視圖。它不能替代仍然需要使用「擴充套件」→「管理」。有關更多信息，請參閱分步指南和 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 元件的文件。這只是為了準備哪些第三方擴充套件將保留、刪除或替換。&lt;br /&gt;
#評估您是否真的需要所有正在使用的擴充套件。Joomla 4 是否內建了可以取代第三方擴充套件的功能？&lt;br /&gt;
#檢視您的分類和文章。有沒有需要清理文章內容的地方？不需要的內容就不用移轉了。&lt;br /&gt;
#您的佈景主題如何呢？假如您從第三方購買佈景主題，他們是否有發佈相容 4.x 的版本？那你有想要繼續使用這個佈景主題嗎？開發者是否有發佈更新路徑？新版本是否具備響應式？您使用的是客製化佈景嗎？或是您使用的，是重度客製了第三方佈景主題？ Joomla 核心佈景主題&#039;&#039;&#039;Protostar 並不相容於 Joomla 4&#039;&#039;&#039;。經過移轉後他會消失。您可以考慮使用 Joomla 4.x 的核心佈景主題 Cassiopeia. For an expansion of Template based considerations，請見 [[S:MyLanguage/Template_Considerations_During_Migration|移轉時佈景主題需要考慮的項目]]。&lt;br /&gt;
#如果您要替換模板，是否需要任何新圖像？例如，如果您的當前網站具有白色背景，並且您的徽標或其他圖像為具有白色背景的 .jpg 檔案，那麼在具有米白色或彩色背景的新模板下，它們的外觀將不會很好。&lt;br /&gt;
#If you redesign or make changes to your site design or navigation, will you have obsolete pages that will require a redirect? If so, document them. A spreadsheet is helpful for documenting links that will need to change.&lt;br /&gt;
&lt;br /&gt;
{{Basic button|S:MyLanguage/Joomla 3.x to 4.x Step by Step Migration|一步步將 Joomla 3.10 遷移（Migration）至 4.x|class=expand}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/20/zh-tw&amp;diff=1033620</id>
		<title>Translations:Planning for Mini-Migration - Joomla 3.10.x to 4.x/20/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/20/zh-tw&amp;diff=1033620"/>
		<updated>2025-01-04T06:45:34Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#如果您要替換模板，是否需要任何新圖像？例如，如果您的當前網站具有白色背景，並且您的徽標或其他圖像為具有白色背景的 .jpg 檔案，那麼在具有米白色或彩色背景的新模板下，它們的外觀將不會很好。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/zh-tw&amp;diff=1033619</id>
		<title>Planning for Mini-Migration - Joomla 3.10.x to 4.x/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/zh-tw&amp;diff=1033619"/>
		<updated>2025-01-04T06:45:01Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;#評估您是否真的需要所有正在使用的擴充套件。Joomla 4 是否內建了可以取代第三方擴充套件的功能？&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
從Joomla 3.10.x 移植到 {{JVer|4.x}} 4.x 算做是迷你移轉或是小規模移轉。這代表說Joomla 核心擴充套件可以用「一鍵升級」的方式來完成，但是第三方擴充套件就不能一概而論，需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
== 導覽 ==&lt;br /&gt;
移轉是重新整理大好時機，可以清除不需要的內容，並開發您網站需要的新功能或是元素。儘可能妥善地發展想法並規劃，讓成果發揮到極致。謹記規劃、規劃、再規劃。良好的規劃有助於執行。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
規劃的初步，先讓自己回答以下的問題，或是執行下列的任務。依據您網站的複雜程度，您可能會需要有更多需要在規劃階段考慮的項目。不幸的是，我們無法羅列出所有可能的情境。到時候我們會架設一個論壇，專門給 Joomla 4.x 移轉用，類似於之前我們為每一個主要版本 Joomla 所規劃的。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 3.10.x 橋接 ==&lt;br /&gt;
{{JVer|3.10}}.x  版本是作為Joomla 3 以及 {{JVer|4}} 產品生命週期之前的橋樑。{{JVer|3.10}}.x 版本發佈主要是為了包含Joomla 4.x更改的 API 向後移植(backports) 開發分支，以協助並減輕社群夥伴們開發下一個主要版本用。&lt;br /&gt;
 {{JVer|3.10}}.x  有個優異的新功能， Joomla! Update 元件，可以協助您檢查您的迷你搬移程序 : [[S:MyLanguage/Pre-Update Check|升級前檢查事項]]&lt;br /&gt;
一旦您的網站升級到3.10，更新前檢查可以協助您確認您的PHP以及SQL選項、設定、以及您使用中的擴充套件相容於Joomla 4.0，使用目標平台(targetplatform) 標記。更多細節請見 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 文件。&lt;br /&gt;
&lt;br /&gt;
== 規劃要採取的行動 ==&lt;br /&gt;
下文假設您已經將您的 Joomla 3.x 網站升級到 3.10.x。這會讓您可以使用升級前檢查，有助於您執行規劃。&lt;br /&gt;
#確認您的網站正執行 3.10.x 版本&lt;br /&gt;
#確認您原本的網站目標。移轉是一個好機會，可以重新對焦您的網站目標，或是設定新的方向。&lt;br /&gt;
#您的伺服器是否符合Joomla! 4 的最低水準 [https://www.joomla.org/about-joomla/technical-requirements.html 技術需求] ？如果沒有，您會需要更換主機。再也沒有比這更好的機會做這件事情了。&lt;br /&gt;
#您將會使用什麼環境來開發？是在您的本機進行開發嗎？是在您的伺服器上設置子網域來進行開發嗎？是否有符合需求的伺服器/主機帳號？&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
#列下正在使用的第三方擴充套件，包含元件、模組、插件、語言以及佈景主題。您可以使用 [https://docs.joomla.org/images/7/7a/3to4-Third-Party_Extension_Checklist_Inventory_Sheet.pdf 第三方擴充套件庫存清查] 或是複製/貼上到文件來當做參考，要用筆紙來手寫筆記也是可以的啦！可以的話順便記錄下，這些套件使用的頻率，重度使用、中度，沒什麼用，還是根本沒用過？&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
#確認您依賴的第三方擴充套件是否已準備好遷移到您要遷移的 Joomla 版本。在 Joomla 更新元件中選擇「Joomla 下一步」選項（一旦運行 Joomla 3.10.x），並檢查它們是否顯示與 Joomla 4 的相容性。不要運行更新到 4.x，只需在 Joomla 更新選項中選擇「Joomla 下一步」，以便顯示「更新前檢查器」。這將幫助您獲得正在使用的擴充套件及其相容性的摘要視圖。它不能替代仍然需要使用「擴充套件」→「管理」。有關更多信息，請參閱分步指南和 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 元件的文件。這只是為了準備哪些第三方擴充套件將保留、刪除或替換。&lt;br /&gt;
#評估您是否真的需要所有正在使用的擴充套件。Joomla 4 是否內建了可以取代第三方擴充套件的功能？&lt;br /&gt;
#檢視您的分類和文章。有沒有需要清理文章內容的地方？不需要的內容就不用移轉了。&lt;br /&gt;
#您的佈景主題如何呢？假如您從第三方購買佈景主題，他們是否有發佈相容 4.x 的版本？那你有想要繼續使用這個佈景主題嗎？開發者是否有發佈更新路徑？新版本是否具備響應式？您使用的是客製化佈景嗎？或是您使用的，是重度客製了第三方佈景主題？ Joomla 核心佈景主題&#039;&#039;&#039;Protostar 並不相容於 Joomla 4&#039;&#039;&#039;。經過移轉後他會消失。您可以考慮使用 Joomla 4.x 的核心佈景主題 Cassiopeia. For an expansion of Template based considerations，請見 [[S:MyLanguage/Template_Considerations_During_Migration|移轉時佈景主題需要考慮的項目]]。&lt;br /&gt;
#If you are changing out your template for a new one, will it require any new images? For example, if your current site has a white background and your logo or other images are .jpg images with a white background it won’t look very nice against a new template with an off-white or coloured background.&lt;br /&gt;
#If you redesign or make changes to your site design or navigation, will you have obsolete pages that will require a redirect? If so, document them. A spreadsheet is helpful for documenting links that will need to change.&lt;br /&gt;
&lt;br /&gt;
{{Basic button|S:MyLanguage/Joomla 3.x to 4.x Step by Step Migration|一步步將 Joomla 3.10 遷移（Migration）至 4.x|class=expand}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/17/zh-tw&amp;diff=1033618</id>
		<title>Translations:Planning for Mini-Migration - Joomla 3.10.x to 4.x/17/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/17/zh-tw&amp;diff=1033618"/>
		<updated>2025-01-04T06:45:00Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;#評估您是否真的需要所有正在使用的擴充套件。Joomla 4 是否內建了可以取代第三方擴充套件的功能？&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#評估您是否真的需要所有正在使用的擴充套件。Joomla 4 是否內建了可以取代第三方擴充套件的功能？&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/zh-tw&amp;diff=1033617</id>
		<title>Planning for Mini-Migration - Joomla 3.10.x to 4.x/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/zh-tw&amp;diff=1033617"/>
		<updated>2025-01-04T06:44:19Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;#確認您依賴的第三方擴充套件是否已準備好遷移到您要遷移的 Joomla 版本。在 Joomla 更新元件中選擇「Joomla 下一步」選項（一旦運行...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
從Joomla 3.10.x 移植到 {{JVer|4.x}} 4.x 算做是迷你移轉或是小規模移轉。這代表說Joomla 核心擴充套件可以用「一鍵升級」的方式來完成，但是第三方擴充套件就不能一概而論，需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
== 導覽 ==&lt;br /&gt;
移轉是重新整理大好時機，可以清除不需要的內容，並開發您網站需要的新功能或是元素。儘可能妥善地發展想法並規劃，讓成果發揮到極致。謹記規劃、規劃、再規劃。良好的規劃有助於執行。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
規劃的初步，先讓自己回答以下的問題，或是執行下列的任務。依據您網站的複雜程度，您可能會需要有更多需要在規劃階段考慮的項目。不幸的是，我們無法羅列出所有可能的情境。到時候我們會架設一個論壇，專門給 Joomla 4.x 移轉用，類似於之前我們為每一個主要版本 Joomla 所規劃的。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 3.10.x 橋接 ==&lt;br /&gt;
{{JVer|3.10}}.x  版本是作為Joomla 3 以及 {{JVer|4}} 產品生命週期之前的橋樑。{{JVer|3.10}}.x 版本發佈主要是為了包含Joomla 4.x更改的 API 向後移植(backports) 開發分支，以協助並減輕社群夥伴們開發下一個主要版本用。&lt;br /&gt;
 {{JVer|3.10}}.x  有個優異的新功能， Joomla! Update 元件，可以協助您檢查您的迷你搬移程序 : [[S:MyLanguage/Pre-Update Check|升級前檢查事項]]&lt;br /&gt;
一旦您的網站升級到3.10，更新前檢查可以協助您確認您的PHP以及SQL選項、設定、以及您使用中的擴充套件相容於Joomla 4.0，使用目標平台(targetplatform) 標記。更多細節請見 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 文件。&lt;br /&gt;
&lt;br /&gt;
== 規劃要採取的行動 ==&lt;br /&gt;
下文假設您已經將您的 Joomla 3.x 網站升級到 3.10.x。這會讓您可以使用升級前檢查，有助於您執行規劃。&lt;br /&gt;
#確認您的網站正執行 3.10.x 版本&lt;br /&gt;
#確認您原本的網站目標。移轉是一個好機會，可以重新對焦您的網站目標，或是設定新的方向。&lt;br /&gt;
#您的伺服器是否符合Joomla! 4 的最低水準 [https://www.joomla.org/about-joomla/technical-requirements.html 技術需求] ？如果沒有，您會需要更換主機。再也沒有比這更好的機會做這件事情了。&lt;br /&gt;
#您將會使用什麼環境來開發？是在您的本機進行開發嗎？是在您的伺服器上設置子網域來進行開發嗎？是否有符合需求的伺服器/主機帳號？&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
#列下正在使用的第三方擴充套件，包含元件、模組、插件、語言以及佈景主題。您可以使用 [https://docs.joomla.org/images/7/7a/3to4-Third-Party_Extension_Checklist_Inventory_Sheet.pdf 第三方擴充套件庫存清查] 或是複製/貼上到文件來當做參考，要用筆紙來手寫筆記也是可以的啦！可以的話順便記錄下，這些套件使用的頻率，重度使用、中度，沒什麼用，還是根本沒用過？&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
#確認您依賴的第三方擴充套件是否已準備好遷移到您要遷移的 Joomla 版本。在 Joomla 更新元件中選擇「Joomla 下一步」選項（一旦運行 Joomla 3.10.x），並檢查它們是否顯示與 Joomla 4 的相容性。不要運行更新到 4.x，只需在 Joomla 更新選項中選擇「Joomla 下一步」，以便顯示「更新前檢查器」。這將幫助您獲得正在使用的擴充套件及其相容性的摘要視圖。它不能替代仍然需要使用「擴充套件」→「管理」。有關更多信息，請參閱分步指南和 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 元件的文件。這只是為了準備哪些第三方擴充套件將保留、刪除或替換。&lt;br /&gt;
#Determine if you really need all the extensions you are using. Could it be that Joomla 4 has built in features that could eliminate the use of a third-party extension?&lt;br /&gt;
#檢視您的分類和文章。有沒有需要清理文章內容的地方？不需要的內容就不用移轉了。&lt;br /&gt;
#您的佈景主題如何呢？假如您從第三方購買佈景主題，他們是否有發佈相容 4.x 的版本？那你有想要繼續使用這個佈景主題嗎？開發者是否有發佈更新路徑？新版本是否具備響應式？您使用的是客製化佈景嗎？或是您使用的，是重度客製了第三方佈景主題？ Joomla 核心佈景主題&#039;&#039;&#039;Protostar 並不相容於 Joomla 4&#039;&#039;&#039;。經過移轉後他會消失。您可以考慮使用 Joomla 4.x 的核心佈景主題 Cassiopeia. For an expansion of Template based considerations，請見 [[S:MyLanguage/Template_Considerations_During_Migration|移轉時佈景主題需要考慮的項目]]。&lt;br /&gt;
#If you are changing out your template for a new one, will it require any new images? For example, if your current site has a white background and your logo or other images are .jpg images with a white background it won’t look very nice against a new template with an off-white or coloured background.&lt;br /&gt;
#If you redesign or make changes to your site design or navigation, will you have obsolete pages that will require a redirect? If so, document them. A spreadsheet is helpful for documenting links that will need to change.&lt;br /&gt;
&lt;br /&gt;
{{Basic button|S:MyLanguage/Joomla 3.x to 4.x Step by Step Migration|一步步將 Joomla 3.10 遷移（Migration）至 4.x|class=expand}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/16/zh-tw&amp;diff=1033616</id>
		<title>Translations:Planning for Mini-Migration - Joomla 3.10.x to 4.x/16/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x/16/zh-tw&amp;diff=1033616"/>
		<updated>2025-01-04T06:44:18Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;#確認您依賴的第三方擴充套件是否已準備好遷移到您要遷移的 Joomla 版本。在 Joomla 更新元件中選擇「Joomla 下一步」選項（一旦運行...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#確認您依賴的第三方擴充套件是否已準備好遷移到您要遷移的 Joomla 版本。在 Joomla 更新元件中選擇「Joomla 下一步」選項（一旦運行 Joomla 3.10.x），並檢查它們是否顯示與 Joomla 4 的相容性。不要運行更新到 4.x，只需在 Joomla 更新選項中選擇「Joomla 下一步」，以便顯示「更新前檢查器」。這將幫助您獲得正在使用的擴充套件及其相容性的摘要視圖。它不能替代仍然需要使用「擴充套件」→「管理」。有關更多信息，請參閱分步指南和 [[S:MyLanguage/Pre-Update Check|Pre-Update Check]] 元件的文件。這只是為了準備哪些第三方擴充套件將保留、刪除或替換。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033615</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033615"/>
		<updated>2025-01-04T06:41:57Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;br /&gt;
&lt;br /&gt;
好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級步驟]] 文件。&lt;br /&gt;
&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，會提升在搬遷作業的困難程度。&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|小搬遷計畫 - Joomla 3.10 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小型搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033614</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033614"/>
		<updated>2025-01-04T06:41:40Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;br /&gt;
&lt;br /&gt;
好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級步驟]] 文件。&lt;br /&gt;
&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，會提升在搬遷作業的困難程度。&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|小搬遷計畫 - Joomla 3.10 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小型搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/7/zh-hant&amp;diff=1033613</id>
		<title>Translations:Planning for Migration/7/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/7/zh-hant&amp;diff=1033613"/>
		<updated>2025-01-04T06:41:40Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;小型搬遷計畫 - Joomla 2.5 到 4.x&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033612</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033612"/>
		<updated>2025-01-04T06:41:18Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;小搬遷計畫 - Joomla 3.10 到 4.x&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;br /&gt;
&lt;br /&gt;
好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級步驟]] 文件。&lt;br /&gt;
&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，會提升在搬遷作業的困難程度。&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|小搬遷計畫 - Joomla 3.10 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/12/zh-hant&amp;diff=1033611</id>
		<title>Translations:Planning for Migration/12/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/12/zh-hant&amp;diff=1033611"/>
		<updated>2025-01-04T06:41:16Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;小搬遷計畫 - Joomla 3.10 到 4.x&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;小搬遷計畫 - Joomla 3.10 到 4.x&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033610</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033610"/>
		<updated>2025-01-04T06:40:57Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;br /&gt;
&lt;br /&gt;
好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級步驟]] 文件。&lt;br /&gt;
&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，會提升在搬遷作業的困難程度。&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for Mini-Migration - Joomla 3.10.x to 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/6/zh-hant&amp;diff=1033609</id>
		<title>Translations:Planning for Migration/6/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/6/zh-hant&amp;diff=1033609"/>
		<updated>2025-01-04T06:40:56Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033608</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033608"/>
		<updated>2025-01-04T06:40:35Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;br /&gt;
&lt;br /&gt;
好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級步驟]] 文件。&lt;br /&gt;
&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，會提升在搬遷作業的困難程度。&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，以及/或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for Mini-Migration - Joomla 3.10.x to 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/5/zh-hant&amp;diff=1033607</id>
		<title>Translations:Planning for Migration/5/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/5/zh-hant&amp;diff=1033607"/>
		<updated>2025-01-04T06:40:34Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，會提升在搬遷作業的困難程度。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033606</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033606"/>
		<updated>2025-01-04T06:39:36Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;br /&gt;
&lt;br /&gt;
好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級步驟]] 文件。&lt;br /&gt;
&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，在搬遷作業中是充滿困難性的部分。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，以及/或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for Mini-Migration - Joomla 3.10.x to 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/4/zh-hant&amp;diff=1033605</id>
		<title>Translations:Planning for Migration/4/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/4/zh-hant&amp;diff=1033605"/>
		<updated>2025-01-04T06:39:36Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033604</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033604"/>
		<updated>2025-01-04T06:39:21Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;br /&gt;
&lt;br /&gt;
好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級步驟]] 文件。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 以及/或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，在搬遷作業中是充滿困難性的部分。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，以及/或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for Mini-Migration - Joomla 3.10.x to 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/14/zh-hant&amp;diff=1033603</id>
		<title>Translations:Planning for Migration/14/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/14/zh-hant&amp;diff=1033603"/>
		<updated>2025-01-04T06:39:19Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;好消息是，Joomla 4.4.x 到 5.x 是一個升級，而不是遷移。前往 [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x 到 5.x 的規劃和升級步驟]] 文件。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033602</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033602"/>
		<updated>2025-01-04T06:38:40Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)=== 如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;br /&gt;
&lt;br /&gt;
=== Joomla 4.4.x to 5.x is an Upgrade, not a migration ===&lt;br /&gt;
Thankfully, Joomla 4.4.x to 5.x is an upgrade, not a migration. Head over to the [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x to 5.x Planning and Upgrade Step by Step]] documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 以及/或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，在搬遷作業中是充滿困難性的部分。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，以及/或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for Mini-Migration - Joomla 3.10.x to 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/11/zh-hant&amp;diff=1033601</id>
		<title>Translations:Planning for Migration/11/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/11/zh-hant&amp;diff=1033601"/>
		<updated>2025-01-04T06:38:39Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)=== 如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Joomla 2.5 到 4.x is two (2) minor migrations (or two (2) mini-migrations)===&lt;br /&gt;
如果您正執行 Joomla 版本 2.5 ，並且想要搬遷到 Joomla4.x，您需要執行兩個迷你升級。首先是 2.5 到 3.10.x。然後是 3.10.x 到 4.x。請見 [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and best course of action.&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033600</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033600"/>
		<updated>2025-01-04T06:38:01Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 to 4.x is Two Minor Migrations (or two mini-migrations) ===&lt;br /&gt;
If you are currently running Joomla 2.5 and want to migrate to Joomla 4.x, you will be doing two mini-migrations. The first will be from 2.5 to 3.10.x. The second will be 3.10.x to 4.x. See [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and the best course of action.&lt;br /&gt;
&lt;br /&gt;
=== Joomla 4.4.x to 5.x is an Upgrade, not a migration ===&lt;br /&gt;
Thankfully, Joomla 4.4.x to 5.x is an upgrade, not a migration. Head over to the [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x to 5.x Planning and Upgrade Step by Step]] documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 以及/或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，在搬遷作業中是充滿困難性的部分。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，以及/或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for Mini-Migration - Joomla 3.10.x to 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033599</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033599"/>
		<updated>2025-01-04T06:37:51Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 to 4.x is Two Minor Migrations (or two mini-migrations) ===&lt;br /&gt;
If you are currently running Joomla 2.5 and want to migrate to Joomla 4.x, you will be doing two mini-migrations. The first will be from 2.5 to 3.10.x. The second will be 3.10.x to 4.x. See [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and the best course of action.&lt;br /&gt;
&lt;br /&gt;
=== Joomla 4.4.x to 5.x is an Upgrade, not a migration ===&lt;br /&gt;
Thankfully, Joomla 4.4.x to 5.x is an upgrade, not a migration. Head over to the [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x to 5.x Planning and Upgrade Step by Step]] documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 以及/或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，在搬遷作業中是充滿困難性的部分。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，以及/或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for Mini-Migration - Joomla 3.10.x to 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033598</id>
		<title>Planning for Migration/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Planning_for_Migration/zh-hant&amp;diff=1033598"/>
		<updated>2025-01-04T06:37:44Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;一些簡短的澄清&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
無論規模大或小，搬遷作業的第一步就是計畫，假如計畫要花上一週或是四週，那麼也得花。計畫會讓整個搬遷過程更順利。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一些簡短的澄清&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== Joomla 1.5 到 3.10.x 或 4.x 是大更新 ===&lt;br /&gt;
Joomla核心底層結構有大幅度的改變，所有的資料庫，包含核心內容、第三方擴充套件以及佈景主題都需要從 1.5 搬遷到 4.x.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== Joomla 2.5 到 3.10.x；以及 3.10.x 到 Joomla 4.x 算是小升級 (或是稱作迷你升級) ===&lt;br /&gt;
迷你升級的意思是說，Joomla 核心擴充套件 (文章、選單、模組、分類、Weblinks、聯絡人、新聞聯播、搜尋)都可以執行一鍵升級，所有的第三方擴充套件，包含佈景主題則需要逐一檢視。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Joomla 2.5 to 4.x is Two Minor Migrations (or two mini-migrations) ===&lt;br /&gt;
If you are currently running Joomla 2.5 and want to migrate to Joomla 4.x, you will be doing two mini-migrations. The first will be from 2.5 to 3.10.x. The second will be 3.10.x to 4.x. See [[Planning for Mini-Migration - Joomla 2.5 to 4.x]] for the links and the best course of action.&lt;br /&gt;
&lt;br /&gt;
=== Joomla 4.4.x to 5.x is an Upgrade, not a migration ===&lt;br /&gt;
Thankfully, Joomla 4.4.x to 5.x is an upgrade, not a migration. Head over to the [[Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step|Joomla 4.4.x to 5.x Planning and Upgrade Step by Step]] documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 需求 ===&lt;br /&gt;
您的伺服器必須符合 [https://downloads.joomla.org/technical-requirements Technical Requirements]  Joomla 3 以及/或是 Joomla 4 ，以在相同伺服器上執行搬遷作業。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 第三方擴充套件 ===&lt;br /&gt;
Joomla 核心算是容易的部份，第三方套件，包含佈景主題，在搬遷作業中是充滿困難性的部分。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 最後的想法和考量 ===&lt;br /&gt;
不論是大型搬遷或是小型搬遷，都有一些需要考量的評估項目。如果您已經執行過從1.5到2.5 的搬遷，以及/或是  2.5 到 3.10.x ，那你幹得真好 ，因為要從2.5 到 3.10sx 以及從3.10x 到 4，要容易得多。如果您正在執行1.5的版本，打算要搬遷到 4，請提起勇氣，因為你一躍跳過中間兩個版本。一個適當的計畫可以讓您正常執行Joomla 4，並將意外狀況縮小到最低程度。&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 3.10.x to 4.x|Planning for Mini-Migration - Joomla 3.10.x to 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning for Mini-Migration - Joomla 2.5 to 4.x|小搬遷計畫 - Joomla 2.5 到 4.x|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-4 columns&amp;quot;&amp;gt;{{Basic button|S:MyLanguage/Planning Migration - Joomla 1.5 to 4|搬遷計畫 - Joomla 1.5 到 4.x|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
[[Category:Migration/zh-tw]]&lt;br /&gt;
[[Category:Tutorials/zh-tw]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/13/zh-hant&amp;diff=1033597</id>
		<title>Translations:Planning for Migration/13/zh-hant</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Planning_for_Migration/13/zh-hant&amp;diff=1033597"/>
		<updated>2025-01-04T06:37:43Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;一些簡短的澄清&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;一些簡短的澄清&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Selecting_data_using_JDatabase/zh-tw&amp;diff=1016282</id>
		<title>Selecting data using JDatabase/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Selecting_data_using_JDatabase/zh-tw&amp;diff=1016282"/>
		<updated>2023-11-02T03:35:23Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;==在查詢語法中使用 OR ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;{{Joomla version|version=3.x}}{{Joomla version|version=2.5|status=eos}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{-}}&lt;br /&gt;
{{tip|請注意，很多網路上的範例會使用 &amp;lt;code&amp;gt;$db-&amp;gt;query()&amp;lt;/code&amp;gt; ， 而非&amp;lt;code&amp;gt;$db-&amp;gt;execute()&amp;lt;/code&amp;gt;。 前者是使用在 Joomla 1.5 以及 2.5 的舊method，在 Joomla 3.0+會回傳 deprecated notice。|title=版本註記}}&lt;br /&gt;
&lt;br /&gt;
這個教學主要分為兩個部分：&lt;br /&gt;
* 從資料庫中插入，更新以及刪除資料。&lt;br /&gt;
* 從一個或多個資料表中選取資料並以不同的形式檢索。&lt;br /&gt;
&lt;br /&gt;
此章節將先聚焦於如何從資料庫中的表格中選取資料，並重新以不同的形式檢索。欲查看其他部分[[S:MyLanguage/Inserting,_Updating_and_Removing_data_using_JDatabase|請點擊此處]]&lt;br /&gt;
&lt;br /&gt;
== 介紹 ==&lt;br /&gt;
Joomla provides a sophisticated database abstraction layer to simplify the usage for third party developers. New versions of the Joomla Platform API provide additional functionality which extends the database layer further, and includes features such as connectors to a greater variety of database servers and the query chaining to improve readability of connection code and simplify SQL coding.&lt;br /&gt;
&lt;br /&gt;
Joomla can use different kinds of SQL database systems and run in a variety of environments with different table-prefixes. In addition to these functions, the class automatically creates the database connection. Besides instantiating the object you need just two lines of code to get a result from the database in a variety of formats. Using the Joomla database layer ensures a maximum of compatibility and flexibility for your extension.&lt;br /&gt;
&lt;br /&gt;
==The Query==&lt;br /&gt;
Joomla&#039;s database querying changed with the introduction of Joomla 1.6. The recommended way of building database queries is through &amp;quot;query chaining&amp;quot; (although string queries are still supported).&lt;br /&gt;
&lt;br /&gt;
Query chaining refers to a method of connecting a number of methods, one after the other, with each method returning an object that can support the next method, improving readability and simplifying code.&lt;br /&gt;
&lt;br /&gt;
To obtain a new instance of the JDatabaseQuery class we use the JDatabaseDriver getQuery method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
&lt;br /&gt;
$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The JDatabaseDriver::getQuery takes an optional argument, $new, which can be true or false (the default being false).&lt;br /&gt;
&lt;br /&gt;
To query our data source we can call a number of JDatabaseQuery methods; these methods encapsulate the data source&#039;s query language (in most cases SQL), hiding query-specific syntax from the developer and increasing the portability of the developer&#039;s source code. &lt;br /&gt;
&lt;br /&gt;
Some of the more frequently used methods include; select, from, join, where and order. There are also methods such as insert, update and delete for modifying records in the data store. By chaining these and other method calls, you can create almost any query against your data store without compromising portability of your code.&lt;br /&gt;
&lt;br /&gt;
==從單個資料表中選取紀錄==&lt;br /&gt;
&lt;br /&gt;
Below is an example of creating a database query using the &amp;lt;tt&amp;gt;JDatabaseQuery&amp;lt;/tt&amp;gt; class. Using the select, from, where and order methods, we can create queries which are flexible, easily readable and portable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Get a db connection.&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
&lt;br /&gt;
// Create a new query object.&lt;br /&gt;
$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
// Select all records from the user profile table where key begins with &amp;quot;custom.&amp;quot;.&lt;br /&gt;
// Order it by the ordering field.&lt;br /&gt;
$query-&amp;gt;select($db-&amp;gt;quoteName(array(&#039;user_id&#039;, &#039;profile_key&#039;, &#039;profile_value&#039;, &#039;ordering&#039;)));&lt;br /&gt;
$query-&amp;gt;from($db-&amp;gt;quoteName(&#039;#__user_profiles&#039;));&lt;br /&gt;
$query-&amp;gt;where($db-&amp;gt;quoteName(&#039;profile_key&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;custom.%&#039;));&lt;br /&gt;
$query-&amp;gt;order(&#039;ordering ASC&#039;);&lt;br /&gt;
&lt;br /&gt;
// Reset the query using our newly populated query object.&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
// Load the results as a list of stdClass objects (see later for more options on retrieving data).&lt;br /&gt;
$results = $db-&amp;gt;loadObjectList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Here the &amp;lt;tt&amp;gt;quoteName()&amp;lt;/tt&amp;gt; function adds appropriate quotes around the column names to avoid conflicts with any database reserved word, now or in the future.)&lt;br /&gt;
&lt;br /&gt;
The query can also be chained to simplify further:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(array(&#039;user_id&#039;, &#039;profile_key&#039;, &#039;profile_value&#039;, &#039;ordering&#039;)))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__user_profiles&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;profile_key&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;custom.%&#039;))&lt;br /&gt;
    -&amp;gt;order(&#039;ordering ASC&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chaining method calls improves code readability and reduces code bloat as queries become longer and more complex.&lt;br /&gt;
&lt;br /&gt;
Grouping can be achieved simply too.  The following query would count the number of articles in each category.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(array(&#039;catid&#039;, &#039;COUNT(*)&#039;))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;))&lt;br /&gt;
    -&amp;gt;group($db-&amp;gt;quoteName(&#039;catid&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A limit can be set to a query using &amp;quot;setLimit&amp;quot;. For example in the following query, it would return up to 10 records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(array(&#039;user_id&#039;, &#039;profile_key&#039;, &#039;profile_value&#039;, &#039;ordering&#039;)))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__user_profiles&#039;))&lt;br /&gt;
    -&amp;gt;setLimit(&#039;10&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==從多個資料表中選取紀錄==&lt;br /&gt;
Using the JDatabaseQuery&#039;s [http://api.joomla.org/11.4/Joomla-Platform/Database/JDatabaseQuery.html#join join] methods, we can select records from multiple related tables. The generic &amp;quot;join&amp;quot; method takes two arguments; the join &amp;quot;type&amp;quot; (inner, outer, left, right) and the join condition. In the following example you will notice that we can use all of the keywords we would normally use if we were writing a native SQL query, including the AS keyword for aliasing tables and the ON keyword for creating relationships between tables. Also note that the table alias is used in all methods which reference table columns (I.e. select, where, order).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Get a db connection.&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
&lt;br /&gt;
// Create a new query object.&lt;br /&gt;
$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
// Select all articles for users who have a username which starts with &#039;a&#039;.&lt;br /&gt;
// Order it by the created date.&lt;br /&gt;
// Note by putting &#039;a&#039; as a second parameter will generate `#__content` AS `a`&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(array(&#039;a.*&#039;, &#039;b.username&#039;, &#039;b.name&#039;))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;, &#039;a&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;INNER&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;b&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.created_by&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;b.username&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;a%&#039;))&lt;br /&gt;
    -&amp;gt;order($db-&amp;gt;quoteName(&#039;a.created&#039;) . &#039; DESC&#039;);&lt;br /&gt;
&lt;br /&gt;
// Reset the query using our newly populated query object.&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
// Load the results as a list of stdClass objects (see later for more options on retrieving data).&lt;br /&gt;
$results = $db-&amp;gt;loadObjectList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The join method above enables us to query both the content and user tables, retrieving articles with their author details. There are also convenience methods for joins:&lt;br /&gt;
* [http://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_innerJoin innerJoin()]&lt;br /&gt;
* [http://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_leftJoin leftJoin()]&lt;br /&gt;
* [http://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_rightJoin rightJoin()] &lt;br /&gt;
* [http://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_outerJoin outerJoin()]&lt;br /&gt;
&lt;br /&gt;
We can use multiple joins to query across more than two tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(array(&#039;a.*&#039;, &#039;b.username&#039;, &#039;b.name&#039;, &#039;c.*&#039;, &#039;d.*&#039;))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;, &#039;a&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;INNER&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;b&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.created_by&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__user_profiles&#039;, &#039;c&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;c.user_id&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;RIGHT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;d&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.catid&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;d.id&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;b.username&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;a%&#039;))&lt;br /&gt;
    -&amp;gt;order($db-&amp;gt;quoteName(&#039;a.created&#039;) . &#039; DESC&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice how chaining makes the source code much more readable for these longer queries.&lt;br /&gt;
&lt;br /&gt;
In some cases, you will also need to use the AS clause when selecting items to avoid column name conflicts. In this case, multiple select statements can be chained in conjunction with using the second parameter of $db-&amp;gt;quoteName.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(&#039;a.*&#039;)&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(&#039;b.username&#039;, &#039;username&#039;))&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(&#039;b.name&#039;, &#039;name&#039;))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;, &#039;a&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;INNER&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;b&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.created_by&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;b.username&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;a%&#039;))&lt;br /&gt;
    -&amp;gt;order($db-&amp;gt;quoteName(&#039;a.created&#039;) . &#039; DESC&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A second array can also be used as the second parameter of the select statement to populate the values of the AS clause. Remember to include nulls in the second array to correspond to columns in the first array that you don&#039;t want to use the AS clause for:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(array(&#039;a.*&#039;))&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(array(&#039;b.username&#039;, &#039;b.name&#039;), array(&#039;username&#039;, &#039;name&#039;)))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;, &#039;a&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;INNER&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;b&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.created_by&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;b.username&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;a%&#039;))&lt;br /&gt;
    -&amp;gt;order($db-&amp;gt;quoteName(&#039;a.created&#039;) . &#039; DESC&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==在查詢語法中使用 OR == &lt;br /&gt;
要在查詢語法中，使用多重的 WHERE 叢集，它們要被當成 AND 看待  &lt;br /&gt;
&lt;br /&gt;
So, for example, the query below will return results where the &#039;name&#039; field AND the &#039;state&#039; field match.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;COUNT(*)&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($value)&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;state&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($state));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To use a WHERE clause as an OR, the query can be written like this&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;COUNT(*)&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($name_one), &#039;OR&#039;)&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($name_two));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
it can also be written like this&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;COUNT(*)&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($name_one)&lt;br /&gt;
    -&amp;gt;orWhere($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($name_two));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Query Results ==&lt;br /&gt;
The database class contains many methods for working with a query&#039;s result set.&lt;br /&gt;
&lt;br /&gt;
If there are no matches to the query, the result will be null.&lt;br /&gt;
&lt;br /&gt;
=== Single Value Result ===&lt;br /&gt;
==== loadResult() ====&lt;br /&gt;
Use &#039;&#039;&#039;loadResult()&#039;&#039;&#039; when you expect just a single value back from your database query. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- &lt;br /&gt;
| 1 || style=&amp;quot;background:yellow&amp;quot; | John Smith || johnsmith@domain.example || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Magda Hellman || magda_h@domain.example || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@domain.example || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is often the result of a &#039;count&#039; query to get a number of records:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;COUNT(*)&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($value));&lt;br /&gt;
&lt;br /&gt;
// Reset the query using our newly populated query object.&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$count = $db-&amp;gt;loadResult();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or where you are just looking for a single field from a single row of the table (or possibly a single field from the first row returned).&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;field_name&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;some_name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($some_value));&lt;br /&gt;
&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadResult();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Single Row Results ===&lt;br /&gt;
Each of these results functions will return a single record from the database even though there may be several records that meet the criteria that you have set. To get more records you need to call the function again.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 1 || John Smith || johnsmith@domain.example || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Magda Hellman || magda_h@domain.example || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@domain.example || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadRow() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadRow()&amp;lt;/tt&amp;gt; returns an indexed array from a single record in the table: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadRow();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; 1, [1] =&amp;gt; John Smith, [2] =&amp;gt; johnsmith@domain.example, [3] =&amp;gt; johnsmith ) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful.&lt;br /&gt;
&lt;br /&gt;
==== loadAssoc() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadAssoc()&amp;lt;/tt&amp;gt; returns an associated array from a single record in the table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssoc();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;name&#039;] // e.g. $row[&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful.&lt;br /&gt;
&lt;br /&gt;
==== loadObject() ====&lt;br /&gt;
loadObject returns a PHP object from a single record in the table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadObject();&lt;br /&gt;
print_r($result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;stdClass Object ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$result-&amp;gt;index // e.g. $result-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful.&lt;br /&gt;
&lt;br /&gt;
===Single Column Results ===&lt;br /&gt;
Each of these results functions will return a single column from the database. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- &lt;br /&gt;
| 1 || style=&amp;quot;background:yellow&amp;quot; | John Smith || johnsmith@domain.example || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || style=&amp;quot;background:yellow&amp;quot; | Magda Hellman || magda_h@domain.example || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || style=&amp;quot;background:yellow&amp;quot; | Yvonne de Gaulle || ydg@domain.example || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadColumn() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadColumn()&amp;lt;/tt&amp;gt; returns an indexed array from a single column in the table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$query-&amp;gt;select(&#039;name&#039;));&lt;br /&gt;
      -&amp;gt;from . . .&amp;quot;;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$column= $db-&amp;gt;loadColumn();&lt;br /&gt;
print_r($column);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; John Smith, [1] =&amp;gt; Magda Hellman, [2] =&amp;gt; Yvonne de Gaulle )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$column[&#039;index&#039;] // e.g. $column[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
# &amp;lt;tt&amp;gt;loadColumn()&amp;lt;/tt&amp;gt; is equivalent to loadColumn(0).&lt;br /&gt;
&lt;br /&gt;
==== loadColumn($index) ====&lt;br /&gt;
loadColumn($index) returns an indexed array from a single column in the table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$query-&amp;gt;select(array(&#039;name&#039;, &#039;email&#039;, &#039;username&#039;));&lt;br /&gt;
      -&amp;gt;from . . .&amp;quot;;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$column= $db-&amp;gt;loadColumn(1);&lt;br /&gt;
print_r($column);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; johnsmith@domain.example, [1] =&amp;gt; magda_h@domain.example, [2] =&amp;gt; ydg@domain.example )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$column[&#039;index&#039;] // e.g. $column[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
loadColumn($index) allows you to iterate through a series of columns in the results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
for ( $i = 0; $i &amp;lt;= 2; $i++ ) {&lt;br /&gt;
  $column= $db-&amp;gt;loadColumn($i);&lt;br /&gt;
  print_r($column);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; John Smith, [1] =&amp;gt; Magda Hellman, [2] =&amp;gt; Yvonne de Gaulle ),&lt;br /&gt;
Array ( [0] =&amp;gt; johnsmith@domain.example, [1] =&amp;gt; magda_h@domain.example, [2] =&amp;gt; ydg@domain.example ),&lt;br /&gt;
Array ( [0] =&amp;gt; johnsmith, [1] =&amp;gt; magdah, [2] =&amp;gt; ydegaulle )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
&lt;br /&gt;
=== Multi-Row Results ===&lt;br /&gt;
Each of these results functions will return multiple records from the database. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 1 || John Smith || johnsmith@domain.example || johnsmith&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 2 || Magda Hellman || magda_h@domain.example || magdah&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@domain.example || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadRowList() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadRowList()&amp;lt;/tt&amp;gt; returns an indexed array of indexed arrays from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadRowList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; Array ( [0] =&amp;gt; 1, [1] =&amp;gt; John Smith, [2] =&amp;gt; johnsmith@domain.example, [3] =&amp;gt; johnsmith ), &lt;br /&gt;
[1] =&amp;gt; Array ( [0] =&amp;gt; 2, [1] =&amp;gt; Magda Hellman, [2] =&amp;gt; magda_h@domain.example, [3] =&amp;gt; magdah ), &lt;br /&gt;
[2] =&amp;gt; Array ( [0] =&amp;gt; 3, [1] =&amp;gt; Yvonne de Gaulle, [2] =&amp;gt; ydg@domain.example, [3] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;][&#039;index&#039;] // e.g. $row[&#039;2&#039;][&#039;3&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadAssocList()&amp;lt;/tt&amp;gt; returns an indexed array of associated arrays from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; Array ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith ), &lt;br /&gt;
[1] =&amp;gt; Array ( [id] =&amp;gt; 2, [name] =&amp;gt; Magda Hellman, [email] =&amp;gt; magda_h@domain.example, [username] =&amp;gt; magdah ), &lt;br /&gt;
[2] =&amp;gt; Array ( [id] =&amp;gt; 3, [name] =&amp;gt; Yvonne de Gaulle, [email] =&amp;gt; ydg@domain.example, [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;][&#039;column_name&#039;] // e.g. $row[&#039;2&#039;][&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList($key) ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadAssocList(&#039;key&#039;)&amp;lt;/tt&amp;gt; returns an associated array - indexed on &#039;key&#039; - of associated arrays from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList(&#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[johnsmith] =&amp;gt; Array ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith ), &lt;br /&gt;
[magdah] =&amp;gt; Array ( [id] =&amp;gt; 2, [name] =&amp;gt; Magda Hellman, [email] =&amp;gt; magda_h@domain.example, [username] =&amp;gt; magdah ), &lt;br /&gt;
[ydegaulle] =&amp;gt; Array ( [id] =&amp;gt; 3, [name] =&amp;gt; Yvonne de Gaulle, [email] =&amp;gt; ydg@domain.example, [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;] // e.g. $row[&#039;johnsmith&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;][&#039;column_name&#039;] // e.g. $row[&#039;johnsmith&#039;][&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList($key, $column) ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadAssocList(&#039;key&#039;, &#039;column&#039;)&amp;lt;/tt&amp;gt; returns an associative array, indexed on &#039;key&#039;, of values from the column named &#039;column&#039; returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList(&#039;id&#039;, &#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[1] =&amp;gt; John Smith, &lt;br /&gt;
[2] =&amp;gt; Magda Hellman, &lt;br /&gt;
[3] =&amp;gt; Yvonne de Gaulle,&lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
==== loadObjectList() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadObjectList()&amp;lt;/tt&amp;gt; returns an indexed array of PHP objects from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadObjectList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; stdClass Object ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, &lt;br /&gt;
    [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith ), &lt;br /&gt;
[1] =&amp;gt; stdClass Object ( [id] =&amp;gt; 2, [name] =&amp;gt; Magda Hellman, &lt;br /&gt;
    [email] =&amp;gt; magda_h@domain.example, [username] =&amp;gt; magdah ), &lt;br /&gt;
[2] =&amp;gt; stdClass Object ( [id] =&amp;gt; 3, [name] =&amp;gt; Yvonne de Gaulle, &lt;br /&gt;
    [email] =&amp;gt; ydg@domain.example, [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;]-&amp;gt;name // e.g. $row[&#039;2&#039;]-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadObjectList($key) ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadObjectList(&#039;key&#039;)&amp;lt;/tt&amp;gt; returns an associated array - indexed on &#039;key&#039; - of objects from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadObjectList(&#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[johnsmith] =&amp;gt; stdClass Object ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, &lt;br /&gt;
    [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith ), &lt;br /&gt;
[magdah] =&amp;gt; stdClass Object ( [id] =&amp;gt; 2, [name] =&amp;gt; Magda Hellman, &lt;br /&gt;
    [email] =&amp;gt; magda_h@domain.example, [username] =&amp;gt; magdah ), &lt;br /&gt;
[ydegaulle] =&amp;gt; stdClass Object ( [id] =&amp;gt; 3, [name] =&amp;gt; Yvonne de Gaulle, &lt;br /&gt;
    [email] =&amp;gt; ydg@domain.example, [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;] // e.g. $row[&#039;johnsmith&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;]-&amp;gt;column_name // e.g. $row[&#039;johnsmith&#039;]-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Result Set Methods ===&lt;br /&gt;
==== getNumRows() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;getNumRows()&amp;lt;/tt&amp;gt; will return the number of result rows found by the last SELECT or SHOW query and waiting to be read. To get a result from getNumRows() you have to run it &#039;&#039;&#039;after&#039;&#039;&#039; the query and &#039;&#039;&#039;before&#039;&#039;&#039; you have retrieved any results. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows().&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$db-&amp;gt;execute();&lt;br /&gt;
$num_rows = $db-&amp;gt;getNumRows();&lt;br /&gt;
print_r($num_rows);&lt;br /&gt;
$result = $db-&amp;gt;loadRowList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will return &amp;lt;pre&amp;gt;3&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: getNumRows() is only valid for statements like SELECT or SHOW that return an actual result set. If you run getNumRows() after loadRowList() - or any other retrieval method - you will get a PHP Warning:&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: mysql_num_rows(): 80 is not a valid MySQL result resource &lt;br /&gt;
in libraries\joomla\database\database\mysql.php on line 344&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample Module Code ==&lt;br /&gt;
&lt;br /&gt;
Below is the code for a simple Joomla module which you can install and run to demonstrate use of the JDatabase functionality, and which you can adapt to experiment with some of the concepts described above. If you are unsure about development and installing a Joomla module then following the tutorial at [[S:MyLanguage/J3.x:Creating a simple module/Introduction| Creating a simple module ]] will help.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note: In any Joomla extensions which you develop that you should avoid accessing the core Joomla tables directly like this and should instead use the Joomla APIs if at all possible, because the database structures may change without warning.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In a folder mod_db_select create the following 2 files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;mod_db_select.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;3.1&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;Database select query demo&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;Code demonstrating use of Joomla Database class to perform SQL SELECT queries&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;files&amp;gt;&lt;br /&gt;
        &amp;lt;filename module=&amp;quot;mod_db_select&amp;quot;&amp;gt;mod_db_select.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
    &amp;lt;/files&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;mod_db_select.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\Factory;&lt;br /&gt;
&lt;br /&gt;
$db = Factory::getDbo();&lt;br /&gt;
&lt;br /&gt;
$me = Factory::getUser();&lt;br /&gt;
&lt;br /&gt;
$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
$query-&amp;gt;select($db-&amp;gt;quoteName(array(&#039;name&#039;, &#039;email&#039;)))&lt;br /&gt;
	-&amp;gt;from($db-&amp;gt;quoteName(&#039;#__users&#039;))&lt;br /&gt;
	-&amp;gt;where($db-&amp;gt;quoteName(&#039;id&#039;) . &#039; != &#039; . $db-&amp;gt;quote($me-&amp;gt;id))&lt;br /&gt;
	-&amp;gt;order($db-&amp;gt;quoteName(&#039;name&#039;) . &#039; ASC&#039;);&lt;br /&gt;
&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
echo $db-&amp;gt;replacePrefix((string) $query);&lt;br /&gt;
&lt;br /&gt;
$results = $db-&amp;gt;loadAssocList();&lt;br /&gt;
&lt;br /&gt;
foreach ($results as $row) {&lt;br /&gt;
	echo &amp;quot;&amp;lt;p&amp;gt;&amp;quot; . $row[&#039;name&#039;] . &amp;quot;, &amp;quot; . $row[&#039;email&#039;] . &amp;quot;&amp;lt;br&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above selects and outputs the username and email of the records in the Joomla &amp;lt;tt&amp;gt;users&amp;lt;/tt&amp;gt; table, apart from those of the currently logged-on user. The method &amp;lt;tt&amp;gt;Factory::getUser()&amp;lt;/tt&amp;gt; returns the &amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; object of the currently logged-on user, or if not logged on, then a blank &amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; object, whose &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; field is set to zero. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;$db-&amp;gt;replacePrefix((string) $query)&amp;lt;/tt&amp;gt; expression returns the actual SQL statement, and outputting this can be useful in debugging. &lt;br /&gt;
&lt;br /&gt;
Zip up the mod_db_select directory to create &amp;lt;tt&amp;gt;mod_db_select.zip&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Within your Joomla administrator go to Install Extensions and via the Upload Package File tab select this zip file to install this sample log module.&lt;br /&gt;
&lt;br /&gt;
Make this module visible by editing it (click on it within the Modules page) then:&lt;br /&gt;
# making its status Published&lt;br /&gt;
# selecting a position on the page for it to be shown&lt;br /&gt;
# on the menu assignment tab specify the pages it should appear on&lt;br /&gt;
&lt;br /&gt;
When you visit a site web page then you should see the module in your selected position, and it should output the SQL SELECT statement and the sequence of name, email values from the Joomla users table. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 另見 ===&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
*[[S:MyLanguage/Inserting, Updating and Removing data using JDatabase|使用 JDatabase 來新增，更新以及刪除資料]]&lt;br /&gt;
*[[S:MyLanguage/Using the union methods in database queries|Using the union methods in database queries]] (Joomla! 3.3+)&lt;br /&gt;
*[https://api.joomla.org/cms-3/classes/JDatabaseQuery.html Joomla CMS 3.8 API] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Database{{#translation:}}]]&lt;br /&gt;
[[Category:JFactory{{#translation:}}]]&lt;br /&gt;
[[Category:Extension development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Selecting_data_using_JDatabase/141/zh-tw&amp;diff=1016281</id>
		<title>Translations:Selecting data using JDatabase/141/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Selecting_data_using_JDatabase/141/zh-tw&amp;diff=1016281"/>
		<updated>2023-11-02T03:35:23Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;要在查詢語法中，使用多重的 WHERE 叢集，它們要被當成 AND 看待&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;要在查詢語法中，使用多重的 WHERE 叢集，它們要被當成 AND 看待&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Selecting_data_using_JDatabase/140/zh-tw&amp;diff=1016280</id>
		<title>Translations:Selecting data using JDatabase/140/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Selecting_data_using_JDatabase/140/zh-tw&amp;diff=1016280"/>
		<updated>2023-11-02T03:35:21Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;==在查詢語法中使用 OR ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==在查詢語法中使用 OR ==&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Selecting_data_using_JDatabase/zh-tw&amp;diff=1016279</id>
		<title>Selecting data using JDatabase/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Selecting_data_using_JDatabase/zh-tw&amp;diff=1016279"/>
		<updated>2023-11-02T03:16:37Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;請注意，很多網路上的範例會使用 &amp;lt;code&amp;gt;$db-&amp;gt;query()&amp;lt;/code&amp;gt; ， 而非&amp;lt;code&amp;gt;$db-&amp;gt;execute()&amp;lt;/code&amp;gt;。 前者是使用在 Joomla 1.5 以及 2.5 的舊method，在 Jo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;{{Joomla version|version=3.x}}{{Joomla version|version=2.5|status=eos}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{-}}&lt;br /&gt;
{{tip|請注意，很多網路上的範例會使用 &amp;lt;code&amp;gt;$db-&amp;gt;query()&amp;lt;/code&amp;gt; ， 而非&amp;lt;code&amp;gt;$db-&amp;gt;execute()&amp;lt;/code&amp;gt;。 前者是使用在 Joomla 1.5 以及 2.5 的舊method，在 Joomla 3.0+會回傳 deprecated notice。|title=版本註記}}&lt;br /&gt;
&lt;br /&gt;
這個教學主要分為兩個部分：&lt;br /&gt;
* 從資料庫中插入，更新以及刪除資料。&lt;br /&gt;
* 從一個或多個資料表中選取資料並以不同的形式檢索。&lt;br /&gt;
&lt;br /&gt;
此章節將先聚焦於如何從資料庫中的表格中選取資料，並重新以不同的形式檢索。欲查看其他部分[[S:MyLanguage/Inserting,_Updating_and_Removing_data_using_JDatabase|請點擊此處]]&lt;br /&gt;
&lt;br /&gt;
== 介紹 ==&lt;br /&gt;
Joomla provides a sophisticated database abstraction layer to simplify the usage for third party developers. New versions of the Joomla Platform API provide additional functionality which extends the database layer further, and includes features such as connectors to a greater variety of database servers and the query chaining to improve readability of connection code and simplify SQL coding.&lt;br /&gt;
&lt;br /&gt;
Joomla can use different kinds of SQL database systems and run in a variety of environments with different table-prefixes. In addition to these functions, the class automatically creates the database connection. Besides instantiating the object you need just two lines of code to get a result from the database in a variety of formats. Using the Joomla database layer ensures a maximum of compatibility and flexibility for your extension.&lt;br /&gt;
&lt;br /&gt;
==The Query==&lt;br /&gt;
Joomla&#039;s database querying changed with the introduction of Joomla 1.6. The recommended way of building database queries is through &amp;quot;query chaining&amp;quot; (although string queries are still supported).&lt;br /&gt;
&lt;br /&gt;
Query chaining refers to a method of connecting a number of methods, one after the other, with each method returning an object that can support the next method, improving readability and simplifying code.&lt;br /&gt;
&lt;br /&gt;
To obtain a new instance of the JDatabaseQuery class we use the JDatabaseDriver getQuery method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
&lt;br /&gt;
$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The JDatabaseDriver::getQuery takes an optional argument, $new, which can be true or false (the default being false).&lt;br /&gt;
&lt;br /&gt;
To query our data source we can call a number of JDatabaseQuery methods; these methods encapsulate the data source&#039;s query language (in most cases SQL), hiding query-specific syntax from the developer and increasing the portability of the developer&#039;s source code. &lt;br /&gt;
&lt;br /&gt;
Some of the more frequently used methods include; select, from, join, where and order. There are also methods such as insert, update and delete for modifying records in the data store. By chaining these and other method calls, you can create almost any query against your data store without compromising portability of your code.&lt;br /&gt;
&lt;br /&gt;
==從單個資料表中選取紀錄==&lt;br /&gt;
&lt;br /&gt;
Below is an example of creating a database query using the &amp;lt;tt&amp;gt;JDatabaseQuery&amp;lt;/tt&amp;gt; class. Using the select, from, where and order methods, we can create queries which are flexible, easily readable and portable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Get a db connection.&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
&lt;br /&gt;
// Create a new query object.&lt;br /&gt;
$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
// Select all records from the user profile table where key begins with &amp;quot;custom.&amp;quot;.&lt;br /&gt;
// Order it by the ordering field.&lt;br /&gt;
$query-&amp;gt;select($db-&amp;gt;quoteName(array(&#039;user_id&#039;, &#039;profile_key&#039;, &#039;profile_value&#039;, &#039;ordering&#039;)));&lt;br /&gt;
$query-&amp;gt;from($db-&amp;gt;quoteName(&#039;#__user_profiles&#039;));&lt;br /&gt;
$query-&amp;gt;where($db-&amp;gt;quoteName(&#039;profile_key&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;custom.%&#039;));&lt;br /&gt;
$query-&amp;gt;order(&#039;ordering ASC&#039;);&lt;br /&gt;
&lt;br /&gt;
// Reset the query using our newly populated query object.&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
// Load the results as a list of stdClass objects (see later for more options on retrieving data).&lt;br /&gt;
$results = $db-&amp;gt;loadObjectList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Here the &amp;lt;tt&amp;gt;quoteName()&amp;lt;/tt&amp;gt; function adds appropriate quotes around the column names to avoid conflicts with any database reserved word, now or in the future.)&lt;br /&gt;
&lt;br /&gt;
The query can also be chained to simplify further:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(array(&#039;user_id&#039;, &#039;profile_key&#039;, &#039;profile_value&#039;, &#039;ordering&#039;)))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__user_profiles&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;profile_key&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;custom.%&#039;))&lt;br /&gt;
    -&amp;gt;order(&#039;ordering ASC&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chaining method calls improves code readability and reduces code bloat as queries become longer and more complex.&lt;br /&gt;
&lt;br /&gt;
Grouping can be achieved simply too.  The following query would count the number of articles in each category.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(array(&#039;catid&#039;, &#039;COUNT(*)&#039;))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;))&lt;br /&gt;
    -&amp;gt;group($db-&amp;gt;quoteName(&#039;catid&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A limit can be set to a query using &amp;quot;setLimit&amp;quot;. For example in the following query, it would return up to 10 records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(array(&#039;user_id&#039;, &#039;profile_key&#039;, &#039;profile_value&#039;, &#039;ordering&#039;)))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__user_profiles&#039;))&lt;br /&gt;
    -&amp;gt;setLimit(&#039;10&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==從多個資料表中選取紀錄==&lt;br /&gt;
Using the JDatabaseQuery&#039;s [http://api.joomla.org/11.4/Joomla-Platform/Database/JDatabaseQuery.html#join join] methods, we can select records from multiple related tables. The generic &amp;quot;join&amp;quot; method takes two arguments; the join &amp;quot;type&amp;quot; (inner, outer, left, right) and the join condition. In the following example you will notice that we can use all of the keywords we would normally use if we were writing a native SQL query, including the AS keyword for aliasing tables and the ON keyword for creating relationships between tables. Also note that the table alias is used in all methods which reference table columns (I.e. select, where, order).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Get a db connection.&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
&lt;br /&gt;
// Create a new query object.&lt;br /&gt;
$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
// Select all articles for users who have a username which starts with &#039;a&#039;.&lt;br /&gt;
// Order it by the created date.&lt;br /&gt;
// Note by putting &#039;a&#039; as a second parameter will generate `#__content` AS `a`&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(array(&#039;a.*&#039;, &#039;b.username&#039;, &#039;b.name&#039;))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;, &#039;a&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;INNER&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;b&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.created_by&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;b.username&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;a%&#039;))&lt;br /&gt;
    -&amp;gt;order($db-&amp;gt;quoteName(&#039;a.created&#039;) . &#039; DESC&#039;);&lt;br /&gt;
&lt;br /&gt;
// Reset the query using our newly populated query object.&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
// Load the results as a list of stdClass objects (see later for more options on retrieving data).&lt;br /&gt;
$results = $db-&amp;gt;loadObjectList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The join method above enables us to query both the content and user tables, retrieving articles with their author details. There are also convenience methods for joins:&lt;br /&gt;
* [http://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_innerJoin innerJoin()]&lt;br /&gt;
* [http://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_leftJoin leftJoin()]&lt;br /&gt;
* [http://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_rightJoin rightJoin()] &lt;br /&gt;
* [http://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_outerJoin outerJoin()]&lt;br /&gt;
&lt;br /&gt;
We can use multiple joins to query across more than two tables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(array(&#039;a.*&#039;, &#039;b.username&#039;, &#039;b.name&#039;, &#039;c.*&#039;, &#039;d.*&#039;))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;, &#039;a&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;INNER&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;b&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.created_by&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__user_profiles&#039;, &#039;c&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;c.user_id&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;RIGHT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;d&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.catid&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;d.id&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;b.username&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;a%&#039;))&lt;br /&gt;
    -&amp;gt;order($db-&amp;gt;quoteName(&#039;a.created&#039;) . &#039; DESC&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice how chaining makes the source code much more readable for these longer queries.&lt;br /&gt;
&lt;br /&gt;
In some cases, you will also need to use the AS clause when selecting items to avoid column name conflicts. In this case, multiple select statements can be chained in conjunction with using the second parameter of $db-&amp;gt;quoteName.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(&#039;a.*&#039;)&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(&#039;b.username&#039;, &#039;username&#039;))&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(&#039;b.name&#039;, &#039;name&#039;))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;, &#039;a&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;INNER&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;b&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.created_by&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;b.username&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;a%&#039;))&lt;br /&gt;
    -&amp;gt;order($db-&amp;gt;quoteName(&#039;a.created&#039;) . &#039; DESC&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A second array can also be used as the second parameter of the select statement to populate the values of the AS clause. Remember to include nulls in the second array to correspond to columns in the first array that you don&#039;t want to use the AS clause for:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query&lt;br /&gt;
    -&amp;gt;select(array(&#039;a.*&#039;))&lt;br /&gt;
    -&amp;gt;select($db-&amp;gt;quoteName(array(&#039;b.username&#039;, &#039;b.name&#039;), array(&#039;username&#039;, &#039;name&#039;)))&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__content&#039;, &#039;a&#039;))&lt;br /&gt;
    -&amp;gt;join(&#039;INNER&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;b&#039;) . &#039; ON &#039; . $db-&amp;gt;quoteName(&#039;a.created_by&#039;) . &#039; = &#039; . $db-&amp;gt;quoteName(&#039;b.id&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;b.username&#039;) . &#039; LIKE &#039; . $db-&amp;gt;quote(&#039;a%&#039;))&lt;br /&gt;
    -&amp;gt;order($db-&amp;gt;quoteName(&#039;a.created&#039;) . &#039; DESC&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using OR in queries== &lt;br /&gt;
When using multiple WHERE clauses in your query, they will be treated as an AND.  &lt;br /&gt;
&lt;br /&gt;
So, for example, the query below will return results where the &#039;name&#039; field AND the &#039;state&#039; field match.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;COUNT(*)&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($value)&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;state&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($state));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
To use a WHERE clause as an OR, the query can be written like this&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;COUNT(*)&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($name_one), &#039;OR&#039;)&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($name_two));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
it can also be written like this&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;COUNT(*)&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($name_one)&lt;br /&gt;
    -&amp;gt;orWhere($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($name_two));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Query Results ==&lt;br /&gt;
The database class contains many methods for working with a query&#039;s result set.&lt;br /&gt;
&lt;br /&gt;
If there are no matches to the query, the result will be null.&lt;br /&gt;
&lt;br /&gt;
=== Single Value Result ===&lt;br /&gt;
==== loadResult() ====&lt;br /&gt;
Use &#039;&#039;&#039;loadResult()&#039;&#039;&#039; when you expect just a single value back from your database query. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- &lt;br /&gt;
| 1 || style=&amp;quot;background:yellow&amp;quot; | John Smith || johnsmith@domain.example || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Magda Hellman || magda_h@domain.example || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@domain.example || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is often the result of a &#039;count&#039; query to get a number of records:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;COUNT(*)&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($value));&lt;br /&gt;
&lt;br /&gt;
// Reset the query using our newly populated query object.&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$count = $db-&amp;gt;loadResult();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or where you are just looking for a single field from a single row of the table (or possibly a single field from the first row returned).&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$db = JFactory::getDbo();&lt;br /&gt;
$query = $db&lt;br /&gt;
    -&amp;gt;getQuery(true)&lt;br /&gt;
    -&amp;gt;select(&#039;field_name&#039;)&lt;br /&gt;
    -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__my_table&#039;))&lt;br /&gt;
    -&amp;gt;where($db-&amp;gt;quoteName(&#039;some_name&#039;) . &amp;quot; = &amp;quot; . $db-&amp;gt;quote($some_value));&lt;br /&gt;
&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadResult();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Single Row Results ===&lt;br /&gt;
Each of these results functions will return a single record from the database even though there may be several records that meet the criteria that you have set. To get more records you need to call the function again.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 1 || John Smith || johnsmith@domain.example || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Magda Hellman || magda_h@domain.example || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@domain.example || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadRow() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadRow()&amp;lt;/tt&amp;gt; returns an indexed array from a single record in the table: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadRow();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; 1, [1] =&amp;gt; John Smith, [2] =&amp;gt; johnsmith@domain.example, [3] =&amp;gt; johnsmith ) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful.&lt;br /&gt;
&lt;br /&gt;
==== loadAssoc() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadAssoc()&amp;lt;/tt&amp;gt; returns an associated array from a single record in the table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssoc();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;name&#039;] // e.g. $row[&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful.&lt;br /&gt;
&lt;br /&gt;
==== loadObject() ====&lt;br /&gt;
loadObject returns a PHP object from a single record in the table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadObject();&lt;br /&gt;
print_r($result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;stdClass Object ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$result-&amp;gt;index // e.g. $result-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful.&lt;br /&gt;
&lt;br /&gt;
===Single Column Results ===&lt;br /&gt;
Each of these results functions will return a single column from the database. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- &lt;br /&gt;
| 1 || style=&amp;quot;background:yellow&amp;quot; | John Smith || johnsmith@domain.example || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || style=&amp;quot;background:yellow&amp;quot; | Magda Hellman || magda_h@domain.example || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || style=&amp;quot;background:yellow&amp;quot; | Yvonne de Gaulle || ydg@domain.example || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadColumn() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadColumn()&amp;lt;/tt&amp;gt; returns an indexed array from a single column in the table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$query-&amp;gt;select(&#039;name&#039;));&lt;br /&gt;
      -&amp;gt;from . . .&amp;quot;;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$column= $db-&amp;gt;loadColumn();&lt;br /&gt;
print_r($column);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; John Smith, [1] =&amp;gt; Magda Hellman, [2] =&amp;gt; Yvonne de Gaulle )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$column[&#039;index&#039;] // e.g. $column[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
# &amp;lt;tt&amp;gt;loadColumn()&amp;lt;/tt&amp;gt; is equivalent to loadColumn(0).&lt;br /&gt;
&lt;br /&gt;
==== loadColumn($index) ====&lt;br /&gt;
loadColumn($index) returns an indexed array from a single column in the table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$query-&amp;gt;select(array(&#039;name&#039;, &#039;email&#039;, &#039;username&#039;));&lt;br /&gt;
      -&amp;gt;from . . .&amp;quot;;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$column= $db-&amp;gt;loadColumn(1);&lt;br /&gt;
print_r($column);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; johnsmith@domain.example, [1] =&amp;gt; magda_h@domain.example, [2] =&amp;gt; ydg@domain.example )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$column[&#039;index&#039;] // e.g. $column[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
loadColumn($index) allows you to iterate through a series of columns in the results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
for ( $i = 0; $i &amp;lt;= 2; $i++ ) {&lt;br /&gt;
  $column= $db-&amp;gt;loadColumn($i);&lt;br /&gt;
  print_r($column);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; John Smith, [1] =&amp;gt; Magda Hellman, [2] =&amp;gt; Yvonne de Gaulle ),&lt;br /&gt;
Array ( [0] =&amp;gt; johnsmith@domain.example, [1] =&amp;gt; magda_h@domain.example, [2] =&amp;gt; ydg@domain.example ),&lt;br /&gt;
Array ( [0] =&amp;gt; johnsmith, [1] =&amp;gt; magdah, [2] =&amp;gt; ydegaulle )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
&lt;br /&gt;
=== Multi-Row Results ===&lt;br /&gt;
Each of these results functions will return multiple records from the database. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 1 || John Smith || johnsmith@domain.example || johnsmith&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 2 || Magda Hellman || magda_h@domain.example || magdah&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@domain.example || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadRowList() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadRowList()&amp;lt;/tt&amp;gt; returns an indexed array of indexed arrays from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadRowList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; Array ( [0] =&amp;gt; 1, [1] =&amp;gt; John Smith, [2] =&amp;gt; johnsmith@domain.example, [3] =&amp;gt; johnsmith ), &lt;br /&gt;
[1] =&amp;gt; Array ( [0] =&amp;gt; 2, [1] =&amp;gt; Magda Hellman, [2] =&amp;gt; magda_h@domain.example, [3] =&amp;gt; magdah ), &lt;br /&gt;
[2] =&amp;gt; Array ( [0] =&amp;gt; 3, [1] =&amp;gt; Yvonne de Gaulle, [2] =&amp;gt; ydg@domain.example, [3] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;][&#039;index&#039;] // e.g. $row[&#039;2&#039;][&#039;3&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadAssocList()&amp;lt;/tt&amp;gt; returns an indexed array of associated arrays from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; Array ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith ), &lt;br /&gt;
[1] =&amp;gt; Array ( [id] =&amp;gt; 2, [name] =&amp;gt; Magda Hellman, [email] =&amp;gt; magda_h@domain.example, [username] =&amp;gt; magdah ), &lt;br /&gt;
[2] =&amp;gt; Array ( [id] =&amp;gt; 3, [name] =&amp;gt; Yvonne de Gaulle, [email] =&amp;gt; ydg@domain.example, [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;][&#039;column_name&#039;] // e.g. $row[&#039;2&#039;][&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList($key) ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadAssocList(&#039;key&#039;)&amp;lt;/tt&amp;gt; returns an associated array - indexed on &#039;key&#039; - of associated arrays from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList(&#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[johnsmith] =&amp;gt; Array ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith ), &lt;br /&gt;
[magdah] =&amp;gt; Array ( [id] =&amp;gt; 2, [name] =&amp;gt; Magda Hellman, [email] =&amp;gt; magda_h@domain.example, [username] =&amp;gt; magdah ), &lt;br /&gt;
[ydegaulle] =&amp;gt; Array ( [id] =&amp;gt; 3, [name] =&amp;gt; Yvonne de Gaulle, [email] =&amp;gt; ydg@domain.example, [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;] // e.g. $row[&#039;johnsmith&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;][&#039;column_name&#039;] // e.g. $row[&#039;johnsmith&#039;][&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList($key, $column) ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadAssocList(&#039;key&#039;, &#039;column&#039;)&amp;lt;/tt&amp;gt; returns an associative array, indexed on &#039;key&#039;, of values from the column named &#039;column&#039; returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList(&#039;id&#039;, &#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[1] =&amp;gt; John Smith, &lt;br /&gt;
[2] =&amp;gt; Magda Hellman, &lt;br /&gt;
[3] =&amp;gt; Yvonne de Gaulle,&lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
==== loadObjectList() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadObjectList()&amp;lt;/tt&amp;gt; returns an indexed array of PHP objects from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadObjectList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; stdClass Object ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, &lt;br /&gt;
    [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith ), &lt;br /&gt;
[1] =&amp;gt; stdClass Object ( [id] =&amp;gt; 2, [name] =&amp;gt; Magda Hellman, &lt;br /&gt;
    [email] =&amp;gt; magda_h@domain.example, [username] =&amp;gt; magdah ), &lt;br /&gt;
[2] =&amp;gt; stdClass Object ( [id] =&amp;gt; 3, [name] =&amp;gt; Yvonne de Gaulle, &lt;br /&gt;
    [email] =&amp;gt; ydg@domain.example, [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;]-&amp;gt;name // e.g. $row[&#039;2&#039;]-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadObjectList($key) ====&lt;br /&gt;
&amp;lt;tt&amp;gt;loadObjectList(&#039;key&#039;)&amp;lt;/tt&amp;gt; returns an associated array - indexed on &#039;key&#039; - of objects from the table records returned by the query:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadObjectList(&#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[johnsmith] =&amp;gt; stdClass Object ( [id] =&amp;gt; 1, [name] =&amp;gt; John Smith, &lt;br /&gt;
    [email] =&amp;gt; johnsmith@domain.example, [username] =&amp;gt; johnsmith ), &lt;br /&gt;
[magdah] =&amp;gt; stdClass Object ( [id] =&amp;gt; 2, [name] =&amp;gt; Magda Hellman, &lt;br /&gt;
    [email] =&amp;gt; magda_h@domain.example, [username] =&amp;gt; magdah ), &lt;br /&gt;
[ydegaulle] =&amp;gt; stdClass Object ( [id] =&amp;gt; 3, [name] =&amp;gt; Yvonne de Gaulle, &lt;br /&gt;
    [email] =&amp;gt; ydg@domain.example, [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;] // e.g. $row[&#039;johnsmith&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;]-&amp;gt;column_name // e.g. $row[&#039;johnsmith&#039;]-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Result Set Methods ===&lt;br /&gt;
==== getNumRows() ====&lt;br /&gt;
&amp;lt;tt&amp;gt;getNumRows()&amp;lt;/tt&amp;gt; will return the number of result rows found by the last SELECT or SHOW query and waiting to be read. To get a result from getNumRows() you have to run it &#039;&#039;&#039;after&#039;&#039;&#039; the query and &#039;&#039;&#039;before&#039;&#039;&#039; you have retrieved any results. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows().&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$db-&amp;gt;execute();&lt;br /&gt;
$num_rows = $db-&amp;gt;getNumRows();&lt;br /&gt;
print_r($num_rows);&lt;br /&gt;
$result = $db-&amp;gt;loadRowList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will return &amp;lt;pre&amp;gt;3&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: getNumRows() is only valid for statements like SELECT or SHOW that return an actual result set. If you run getNumRows() after loadRowList() - or any other retrieval method - you will get a PHP Warning:&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: mysql_num_rows(): 80 is not a valid MySQL result resource &lt;br /&gt;
in libraries\joomla\database\database\mysql.php on line 344&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample Module Code ==&lt;br /&gt;
&lt;br /&gt;
Below is the code for a simple Joomla module which you can install and run to demonstrate use of the JDatabase functionality, and which you can adapt to experiment with some of the concepts described above. If you are unsure about development and installing a Joomla module then following the tutorial at [[S:MyLanguage/J3.x:Creating a simple module/Introduction| Creating a simple module ]] will help.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note: In any Joomla extensions which you develop that you should avoid accessing the core Joomla tables directly like this and should instead use the Joomla APIs if at all possible, because the database structures may change without warning.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In a folder mod_db_select create the following 2 files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;mod_db_select.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;3.1&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;Database select query demo&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;Code demonstrating use of Joomla Database class to perform SQL SELECT queries&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;files&amp;gt;&lt;br /&gt;
        &amp;lt;filename module=&amp;quot;mod_db_select&amp;quot;&amp;gt;mod_db_select.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
    &amp;lt;/files&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;mod_db_select.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
use Joomla\CMS\Factory;&lt;br /&gt;
&lt;br /&gt;
$db = Factory::getDbo();&lt;br /&gt;
&lt;br /&gt;
$me = Factory::getUser();&lt;br /&gt;
&lt;br /&gt;
$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
$query-&amp;gt;select($db-&amp;gt;quoteName(array(&#039;name&#039;, &#039;email&#039;)))&lt;br /&gt;
	-&amp;gt;from($db-&amp;gt;quoteName(&#039;#__users&#039;))&lt;br /&gt;
	-&amp;gt;where($db-&amp;gt;quoteName(&#039;id&#039;) . &#039; != &#039; . $db-&amp;gt;quote($me-&amp;gt;id))&lt;br /&gt;
	-&amp;gt;order($db-&amp;gt;quoteName(&#039;name&#039;) . &#039; ASC&#039;);&lt;br /&gt;
&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&lt;br /&gt;
echo $db-&amp;gt;replacePrefix((string) $query);&lt;br /&gt;
&lt;br /&gt;
$results = $db-&amp;gt;loadAssocList();&lt;br /&gt;
&lt;br /&gt;
foreach ($results as $row) {&lt;br /&gt;
	echo &amp;quot;&amp;lt;p&amp;gt;&amp;quot; . $row[&#039;name&#039;] . &amp;quot;, &amp;quot; . $row[&#039;email&#039;] . &amp;quot;&amp;lt;br&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above selects and outputs the username and email of the records in the Joomla &amp;lt;tt&amp;gt;users&amp;lt;/tt&amp;gt; table, apart from those of the currently logged-on user. The method &amp;lt;tt&amp;gt;Factory::getUser()&amp;lt;/tt&amp;gt; returns the &amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; object of the currently logged-on user, or if not logged on, then a blank &amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; object, whose &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; field is set to zero. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;$db-&amp;gt;replacePrefix((string) $query)&amp;lt;/tt&amp;gt; expression returns the actual SQL statement, and outputting this can be useful in debugging. &lt;br /&gt;
&lt;br /&gt;
Zip up the mod_db_select directory to create &amp;lt;tt&amp;gt;mod_db_select.zip&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Within your Joomla administrator go to Install Extensions and via the Upload Package File tab select this zip file to install this sample log module.&lt;br /&gt;
&lt;br /&gt;
Make this module visible by editing it (click on it within the Modules page) then:&lt;br /&gt;
# making its status Published&lt;br /&gt;
# selecting a position on the page for it to be shown&lt;br /&gt;
# on the menu assignment tab specify the pages it should appear on&lt;br /&gt;
&lt;br /&gt;
When you visit a site web page then you should see the module in your selected position, and it should output the SQL SELECT statement and the sequence of name, email values from the Joomla users table. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=== 另見 ===&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
*[[S:MyLanguage/Inserting, Updating and Removing data using JDatabase|使用 JDatabase 來新增，更新以及刪除資料]]&lt;br /&gt;
*[[S:MyLanguage/Using the union methods in database queries|Using the union methods in database queries]] (Joomla! 3.3+)&lt;br /&gt;
*[https://api.joomla.org/cms-3/classes/JDatabaseQuery.html Joomla CMS 3.8 API] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Database{{#translation:}}]]&lt;br /&gt;
[[Category:JFactory{{#translation:}}]]&lt;br /&gt;
[[Category:Extension development{{#translation:}}]]&lt;br /&gt;
[[Category:Development Recommended Reading{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Selecting_data_using_JDatabase/1/zh-tw&amp;diff=1016278</id>
		<title>Translations:Selecting data using JDatabase/1/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Selecting_data_using_JDatabase/1/zh-tw&amp;diff=1016278"/>
		<updated>2023-11-02T03:16:34Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;請注意，很多網路上的範例會使用 &amp;lt;code&amp;gt;$db-&amp;gt;query()&amp;lt;/code&amp;gt; ， 而非&amp;lt;code&amp;gt;$db-&amp;gt;execute()&amp;lt;/code&amp;gt;。 前者是使用在 Joomla 1.5 以及 2.5 的舊method，在 Jo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;請注意，很多網路上的範例會使用 &amp;lt;code&amp;gt;$db-&amp;gt;query()&amp;lt;/code&amp;gt; ， 而非&amp;lt;code&amp;gt;$db-&amp;gt;execute()&amp;lt;/code&amp;gt;。 前者是使用在 Joomla 1.5 以及 2.5 的舊method，在 Joomla 3.0+會回傳 deprecated notice。&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Secure_coding_guidelines/zh-tw&amp;diff=999294</id>
		<title>Secure coding guidelines/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Secure_coding_guidelines/zh-tw&amp;diff=999294"/>
		<updated>2023-02-09T03:03:08Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Joomla 包含了很多特色，可以協助在其上開發應用和擴充套件時的安全性。您應該要盡可能地一直使用這些特色功能，因為它們是已經被開發社群嘗試過、檢查過；而且可能還會在未來需要被更新。以下是關於使用 Joomla API最佳實踐的描述，確保您的擴充套件是盡可能安全的。&lt;br /&gt;
&lt;br /&gt;
==使用 request 來獲取資料==&lt;br /&gt;
{{JVer|3.x}} 從Joomla 3.0 版本開始， 應該停止使用&amp;lt;code&amp;gt;[https://api.joomla.org/cms-3/classes/JRequest.html JRequest]&amp;lt;/code&amp;gt;，改成使用&amp;lt;code&amp;gt;[[Retrieving_request_data_using_JInput|JInput]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
所有來自使用者發起的輸入都必須要被視為具有潛在危險的，並且必須要在使用前先做過清理。您應該總是使用 Joomla [[Retrieving_request_data_using_JInput|JInput]] class 來從請求擷取資料，而不是赤裸裸的  &amp;lt;code&amp;gt;$_GET&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$_POST&amp;lt;/code&amp;gt; 或是 &amp;lt;code&amp;gt;$_REQUEST&amp;lt;/code&amp;gt; 變項，因為 &amp;lt;code&amp;gt; JInput &amp;lt;/code&amp;gt; method 預設會過濾用戶的輸入。&amp;lt;code&amp;gt; JInput &amp;lt;/code&amp;gt; 會處理所有方面的用戶請求，讓它獨立於使用的 request method。&amp;lt;code&amp;gt; JInput &amp;lt;/code&amp;gt; 也可以用於獲取 cookie資料，甚至是伺服器和環境變數。然而，非常重要的是，使用正確的[[Retrieving_request_data_using_JInput|JInput]] method，來確保最大的安全性。使用&amp;lt;code&amp;gt; [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] &amp;lt;/code&amp;gt; method ，輔以預設參數是十分容易的，儘管在很多案例中，還可以對使用者的輸入套用更加嚴格的規範。&lt;br /&gt;
&lt;br /&gt;
非常重要的是，要了解 &amp;lt;code&amp;gt; [[Retrieving_request_data_using_JInput|JInput]] &amp;lt;/code&amp;gt;方法並非 SQL-aware，而且需要額外作業來防範 SQL Injection。如果沒有在呼叫 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] 當中指定預設，並沒有預設的值會被取回。假如沒有指定預設的話，而且沒有在請求變數當中顯示 argument，就會取回未定義(undefined)。&lt;br /&gt;
&lt;br /&gt;
使用 [[Retrieving_request_data_using_JInput|JInput]] 也可以消除您需要留意 &amp;lt;code&amp;gt;magic_quotes_gpc &amp;lt;/code&amp;gt; 設定的麻煩。無論您的 &amp;lt;code&amp;gt;magic_quotes_gpc &amp;lt;/code&amp;gt; 有沒有打開，[[Retrieving_request_data_using_JInput|JInput]] 都恪盡職守。請查閱[http://php.net/manual/en/security.magicquotes.php security.magicquotes.php] 以獲得更多資訊。&lt;br /&gt;
&lt;br /&gt;
考慮到用戶的輸入內容，您需要思考關於您要獲取的資料類型，並套用最嚴謹的 &amp;lt;code&amp;gt;[[Retrieving_request_data_using_JInput#Getting_Values|JInput]] &amp;lt;/code&amp;gt;類型，依照每個不同的案例來應用。特定地說，避免使用像是&amp;lt;code&amp;gt;[[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] &amp;lt;/code&amp;gt;的懶惰蟲手段，因為它會取回陣列，當中可能包含您不想要顯示的。儘管這些內容會被清理，它們經常在某些個別 argument 中，被額外的過濾器找到。例如，get 方法會把所有的 arguments 當成字串(string) 來處理，然而它們是可以被限制為整數之類的。&lt;br /&gt;
&lt;br /&gt;
JInput 方法中頭三個參數 (parameter) 是相同的，只有頭一項 parameter 是強制的。一般而言，格式是&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    JFactory::getApplication-&amp;gt;input-&amp;gt;&amp;lt;data-source&amp;gt;-&amp;gt;get&amp;lt;type&amp;gt;( &amp;lt;name&amp;gt;, &amp;lt;default&amp;gt; )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
其中&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| &amp;lt;type&amp;gt; || 可以獲取的資料類型 (在底下查可以使用的類型)。&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;name&amp;gt; || 要獲取的變數(variable)的名稱(name) (例如，在 URL 當中 argument 的名稱name).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;default&amp;gt; || 預設的值&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;lt;data-source&amp;amp;gt; || 指定變數要從何處來獲取 (見底下).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
支援底下的 &amp;amp;lt;data-source&amp;amp;gt; 值:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| get || 由 URL 中 query 的部分送出的資料&lt;br /&gt;
|-&lt;br /&gt;
| post || 從欄位 (field) 送出的資料。&lt;br /&gt;
|-&lt;br /&gt;
| method || The same as either GET or POST depending on how the request was made.&lt;br /&gt;
|-&lt;br /&gt;
| cookie || 在 cookies 中送出的資料。&lt;br /&gt;
|-&lt;br /&gt;
| request || 所有的 GET, POST 以及 COOKIE 合併資料。這是預設的。&lt;br /&gt;
|-&lt;br /&gt;
| files || 關於 POST request 檔案上傳的資訊&lt;br /&gt;
|-&lt;br /&gt;
| env || 環境變數 (platform-specific)&lt;br /&gt;
|-&lt;br /&gt;
| server || 網站伺服器變數 (platform-specific)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
請注意預設會使用 REQUEST，其中包含了 cookie 資料。&lt;br /&gt;
&lt;br /&gt;
以下的段落深入解釋每種資料類型。&lt;br /&gt;
&lt;br /&gt;
===整數===&lt;br /&gt;
以下會接受整數。整數型可以包含一個前導的負號(&amp;lt;code&amp;gt; - &amp;lt;/code&amp;gt;)，但正號(&amp;lt;code&amp;gt; + &amp;lt;/code&amp;gt;)是不允許的。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$integer = JFactory::getApplication-&amp;gt;input-&amp;gt;getInt( &#039;id&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 request 回傳 &amp;quot;id&amp;quot; argument 的值from the request (預設包含所有的 GET, POST and COOKIE data)。預設值是零&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$integer = JFactory::getApplication-&amp;gt;input-&amp;gt;cookie-&amp;gt;getInt( &#039;myId&#039;, 12 );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 cookie 回傳 &amp;quot;myId&amp;quot; 變數的值，預設值是12&lt;br /&gt;
&lt;br /&gt;
===浮點數===&lt;br /&gt;
浮點數型可以包含一個前導的負號(&amp;lt;code&amp;gt; - &amp;lt;/code&amp;gt;)，但正號(&amp;lt;code&amp;gt; + &amp;lt;/code&amp;gt;)是不允許的。如果數字包含了千分位號，那千分位號前頭必須要至少有一個數字。例如，&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$float = JFactory::getApplication-&amp;gt;input-&amp;gt;getFloat( &#039;price&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會回傳請求的 &#039;price&#039; 參數，預設的值是 &amp;quot;0.0&amp;quot;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$float = JFactory::getApplication-&amp;gt;input-&amp;gt;post-&amp;gt;getFloat( &#039;total&#039;, 100.00 );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 POST (而非 GET) 請求回傳 &#039;total&#039; 值。預設的值是 100.00&lt;br /&gt;
&lt;br /&gt;
===布林值===&lt;br /&gt;
所有「非零」的值都會被視為 &#039;true&#039;。零是 &#039;false&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$boolean = JFactory::getApplication-&amp;gt;input-&amp;gt;getBool( &#039;show&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
如果請求 &#039;show&#039; 參數的值是零，上面的程式會回傳 false；而如果是其他的參數，會回傳 1 (true)。預設的值是 false. 請注意任何字串都會造成回傳 true，所以使用URL包含&amp;quot;?show=false&amp;quot; 來呼叫上述的程式，事實上會回傳 true!&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$boolean = JFactory::getApplication-&amp;gt;input-&amp;gt;get-&amp;gt;getBool( &#039;hide&#039;, true );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 GET 請求 (而非 POST) 回傳 &#039;hide&#039; 參數的值。預設的值是 true.&lt;br /&gt;
&lt;br /&gt;
===Word===&lt;br /&gt;
Word 的定義是指使用A到Z組成的字段。在 word 中使用部分小寫的字母是允許的。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$word = JFactory::getApplication-&amp;gt;input-&amp;gt;cookie-&amp;gt;getWord( &#039;search-word&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取由request送出的 &#039;search-word&#039; 的值。預設是空白字串。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$word = JFactory::getApplication-&amp;gt;input-&amp;gt;cookie-&amp;gt;getWord( &#039;keyword&#039;, &#039;&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取 cookie 中 &#039;keyword&#039; 變數的值。預設是空白字串。&lt;br /&gt;
&lt;br /&gt;
===指令(Command)===&lt;br /&gt;
指令(Command) 類似 word 但是允許的字元是更廣泛的。允許的字元包含：all alphanumeric characters, dot, dash (hyphen) and underscore.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$command = JFactory::getApplication-&amp;gt;input-&amp;gt;getCmd( &#039;option&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取由 request 請求回傳的 &amp;quot;option&amp;quot; 值。預設值是空字串。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$command = JFactory::getApplication-&amp;gt;input-&amp;gt;post-&amp;gt;getCmd( &#039;controller&#039;, &#039;view&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取由 POST 請求(而非 GET) &amp;quot;controller&amp;quot; 參數的值。預設值是 &#039;view&#039;&lt;br /&gt;
&lt;br /&gt;
===字串===&lt;br /&gt;
字串型允許更廣泛的字元輸入 It also takes an optional fourth argument specifying some additional mask options.  請查看 [[#Filter options]] for information on the available masks.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$string = JFactory::getApplication-&amp;gt;input-&amp;gt;getString( &#039;description&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取從 request 回傳 &amp;quot;description&amp;quot; 參數的值。預設的值是空字串。輸入的值會清除前後的空白，以及 HTML 標籤。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$string = JFactory::getApplication-&amp;gt;input-&amp;gt;getString( &#039;text&#039;, &#039;&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取從 request 回傳 &amp;quot;text&amp;quot; 參數的值。預設的值是空字串。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$string = JFactory::getApplication-&amp;gt;input-&amp;gt;getString( &#039;template&#039;, &#039;&amp;lt;html /&amp;gt;&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 request 回傳&amp;quot;template&amp;quot;參數的值。預設的值是 &#039;&amp;lt;html /&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
===JSON 字串===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$json = JFactory::getApplication-&amp;gt;input-&amp;gt;json-&amp;gt;get( &#039;var_name&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===通用及其他資料類型===&lt;br /&gt;
如果上述的 methods 您要使用的，還有一些額外的過濾類型，可以直接呼叫 &amp;lt;code&amp;gt;[[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] &amp;lt;/code&amp;gt; method 。語法是：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JFactory::getApplication-&amp;gt;input-&amp;gt;get( &amp;lt;name&amp;gt;, &amp;lt;default&amp;gt;, &amp;lt;type&amp;gt; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
其中的：&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| &amp;lt;name&amp;gt; || the name of the variable to be retrieved (for example, the name of an argument in a URL).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;default&amp;gt; || 預設值。如果沒有在[[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] 呼叫中指定預設值，則沒有預設值會被回傳。&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;type&amp;gt; || 指定的預期資料類型 (見底下)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first three arguments are the same as for the more specific methods described earlier.  Only the first argument is mandatory.&lt;br /&gt;
&lt;br /&gt;
允許的 &amp;lt;type&amp;gt; 值，大小寫有分別，如底下：&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| INT, INTEGER || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getInt]].&lt;br /&gt;
|-&lt;br /&gt;
| UINT || Get an unsigned integer. 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getUint]].&lt;br /&gt;
|-&lt;br /&gt;
| FLOAT, DOUBLE || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getFloat]].&lt;br /&gt;
|-&lt;br /&gt;
| BOOL, BOOLEAN || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getBool]].&lt;br /&gt;
|-&lt;br /&gt;
| WORD || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getWord]].&lt;br /&gt;
|-&lt;br /&gt;
| ALNUM || 僅允許 alphanumeric 字元 (a-z, A-Z, 0-9). 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getAlnum]].&lt;br /&gt;
|-&lt;br /&gt;
| CMD || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getCmd]].&lt;br /&gt;
|-&lt;br /&gt;
| BASE64 || 僅允許可以被呈現於base64編碼的字元 (也就是 a-z, A-Z, 0-9, /, + 和 =)。相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getBase64]].&lt;br /&gt;
|-&lt;br /&gt;
| STRING || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getString]].&lt;br /&gt;
|-&lt;br /&gt;
| ARRAY || Source is not filtered but is cast to array type. When using this type you should use JFilterInput directly to filter the values in your data array.&lt;br /&gt;
|-&lt;br /&gt;
| HTML || 經過安全處理的字串，相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getHtml]].&lt;br /&gt;
|-&lt;br /&gt;
| PATH || Valid pathname regex that filters out common attacks.  例如，any path beginning with a &amp;quot;/&amp;quot; will return an empty string.  Simliarly, any path containing &amp;quot;/./&amp;quot; or &amp;quot;/../&amp;quot; will return an empty string.  Dots within filenames are okay though. 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getPath]].&lt;br /&gt;
|-&lt;br /&gt;
| USERNAME || 移除 control 字元 (0x00 - 0x1F), 0x7F, &amp;lt;, &amp;gt;, &amp;quot;, &#039;, % and &amp;amp;. 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getUsername]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===過濾選項===&lt;br /&gt;
所有的輸入值都應該要用&amp;lt;code&amp;gt; JFilterInput-&amp;gt;clean &amp;lt;/code&amp;gt;來過濾&lt;br /&gt;
&lt;br /&gt;
過濾值矩陣&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$data = JFactory::getApplication()-&amp;gt;input-&amp;gt;post-&amp;gt;get(&#039;data&#039;, array(), &#039;array&#039;);&lt;br /&gt;
$filter = JFilterInput::getInstance();&lt;br /&gt;
&lt;br /&gt;
foreach ($data as $value)&lt;br /&gt;
{&lt;br /&gt;
	$array[] = $filter-&amp;gt;clean($value, &#039;string&#039;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
要看更多的過濾類型，請看 [https://github.com/joomla/joomla-cms/blob/master/libraries/joomla/filter/input.php#L115 JFilterInput source].&lt;br /&gt;
&lt;br /&gt;
底下列出的選項是過時的 [[JRequest]] library.&lt;br /&gt;
允許的 &amp;lt;options&amp;gt; 值羅列如下 (預設並不會套用任何一項)：&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| JREQUEST_NOTRIM || 並不會移除字串前後的空白&lt;br /&gt;
|-&lt;br /&gt;
| JREQUEST_ALLOWRAW || 不會套用任何的過濾條件，請絕對謹慎使用！&lt;br /&gt;
|-&lt;br /&gt;
| JREQUEST_ALLOWHTML || 不會移除字串中的 HTML &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Masks can be combined by logically OR&#039;ing them.  如果沒有指定過濾選項，那麼預設會移除空白，並且HTML會被移除。&lt;br /&gt;
&lt;br /&gt;
===上傳檔案===&lt;br /&gt;
關於檔案上傳的安全性，網站伺服器已經提供了不錯的想法，然而，還是需要有些額外的手續，來確保檔案名稱以及路徑不會被濫用。一個簡化過的請求上傳檔案表單看起來像這樣：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_mycomponent/form_handler.php&amp;quot;  method=&amp;quot;post&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;Filedata&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
按下送出按鈕後，瀏覽器將會使用POST請求來上傳檔案，呼叫 Joomla! 的 &amp;lt;code&amp;gt; &amp;quot;components/com_mycomponent/form_handler.php&amp;quot; &amp;lt;/code&amp;gt; 來傳送控制項目這包含了像是以下的程式碼。變項 $somepath 必須要被設定到路徑中，讓網頁伺服器有權限可以建立檔案。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Check to ensure this file is included in Joomla!&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die( &#039;Restricted access&#039; );&lt;br /&gt;
&lt;br /&gt;
// 從 request 獲得檔案資料矩陣&lt;br /&gt;
$file = JFactory::getApplication-&amp;gt;input-&amp;gt;get( &#039;Filedata&#039;, &#039;&#039;, &#039;files&#039;, &#039;array&#039; );&lt;br /&gt;
&lt;br /&gt;
// 讓檔案名稱安全無害&lt;br /&gt;
jimport(&#039;joomla.filesystem.file&#039;);&lt;br /&gt;
$file[&#039;name&#039;] = JFile::makeSafe($file[&#039;name&#039;]);&lt;br /&gt;
&lt;br /&gt;
// 將上傳的檔案移動到常駐位置&lt;br /&gt;
if (isset( $file[&#039;name&#039;] )) {&lt;br /&gt;
&lt;br /&gt;
    // Make sure that the full file path is safe.&lt;br /&gt;
    $filepath = JPath::clean( $somepath.&#039;/&#039;.strtolower( $file[&#039;name&#039;] ) );&lt;br /&gt;
&lt;br /&gt;
    // 移動上傳的檔案&lt;br /&gt;
    JFile::upload( $file[&#039;tmp_name&#039;], $filepath );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Saving a request variable into user state===&lt;br /&gt;
Because setting a user state variable from a variable in the request is such a common operation, there is an API method to make the task easier.  This is generally safe to use because it calls [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] to obtain the input from the request, but remember that none of the input filtering calls will protect against SQL injection attempts.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$app = JFactory::getApplication();&lt;br /&gt;
$app-&amp;gt;getUserStateFromRequest( &amp;lt;key&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;default&amp;gt;, &amp;lt;type&amp;gt; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| &amp;lt;key&amp;gt; || the name of the variable in the user state.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;name&amp;gt; || the name of the request variable (same as the first argument of a [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] call).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;default&amp;gt; || the default value to be assigned to the user state variable if the request variable is absent.  The default is null.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;type&amp;gt; || 預期的變數型別&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
例如，getting an integer variable called &#039;id&#039; from the request with a default value of 0, then saving it into a session variable called &#039;myid&#039; can be done like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$app = JFactory::getApplication();&lt;br /&gt;
$app-&amp;gt;getUserStateFromRequest( &#039;myid&#039;, &#039;id, 0, &#039;int&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
instead of something like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$app = JFactory::getApplication();&lt;br /&gt;
$app-&amp;gt;setUserState( &#039;myid&#039;, $app-&amp;gt;input-&amp;gt;getInt( &#039;id&#039;, 0 ) );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==慎重結構 SQL queries==&lt;br /&gt;
SQL Injection 是常見的網站攻擊類型之一，攻擊者會對輸入值管控不良的資料庫，修改資料庫請求的語法來破壞資料庫。攻擊結果會造成資料庫內容被破壞，或是隱私資料外洩。因此，確保SQL語法結構被送出時，能夠被正確地使用 escape 以及 quote 過濾，是很重要的，這樣惡意輸入才不會構成惡意的 SQL 語法。您將不能倚靠[[Retrieving_request_data_using_JInput|JInput]] 方法來完成這件事，因為它並非 SQL-aware。&lt;br /&gt;
&lt;br /&gt;
===強化整數以及其他數字值的安全===&lt;br /&gt;
在 MySQL 資料庫中，數字欄位不應該被 quote，因此，將它們做類型轉換是很重要的。若是沒有這樣處理，您的程式碼會暴露於風險之下，讓駭客在 SQL 資料中存放字串。&lt;br /&gt;
&lt;br /&gt;
依照其類型，數值類型看起來像這樣：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// For SQL data types: INT, INTEGER, TINYINT, SMALLINT, MEDIUMINT, BIGINT, YEAR&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `id`=&#039; . (int) $id;&lt;br /&gt;
&lt;br /&gt;
// For SQL data types: FLOAT, DOUBLE&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `id`=&#039; . (float) $id;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
總是對使用 &amp;lt;cdoe&amp;gt; JInput-&amp;gt;getInt&amp;lt;/code&amp;gt;獲得的變數進行整數型別轉換，絕對是個好習慣。關於 SQL 注入攻擊更進一步的資訊，可以在 http://php.net/manual/en/security.database.sql-injection.php 以及 [[Retrieving_request_data_using_JInput#Getting_Values]] 找到。&lt;br /&gt;
&lt;br /&gt;
===強化字串安全===&lt;br /&gt;
在一個遵循規範的範例中，會假定&amp;lt;code&amp;gt; $db &amp;lt;/code&amp;gt; 是joomla!資料庫物件的 instance 。這可以確保從[https://docs.joomla.org/Using_the_JFactory_class JFactory] 取用，使用&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$db = JFactory::getDBO();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
字串在使用於 SQL 語法之前，一定要先進行清理。這事實上是相當容易的，因為 [https://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_quote JDatabase-&amp;gt;quote] method 已經為您清理所有的可疑內容了。您也可以直接使用 [https://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_escape JDatabase-&amp;gt;escape] method。相當於底下的語法：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `field` = &#039; . $db-&amp;gt;quote( $db-&amp;gt;escape( $field ), false );&lt;br /&gt;
&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `field` = &#039; . $db-&amp;gt;quote( $field );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===強化搜尋安全===&lt;br /&gt;
請特別留意使用 LIKE 的句法，它會包含 % 萬用字元(wildcard character)做出特別的逃逸，為了要避免可能發生的DoS阻斷攻擊。LIKE 句法可以如此來處理：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
//  用逃逸user-supplied string來結構搜尋字詞，並且如果有必要的話，手動加入 % 萬用字元.&lt;br /&gt;
$search = &#039;%&#039; . $db-&amp;gt;escape( $search, true ) . &#039;%&#039;;&lt;br /&gt;
&lt;br /&gt;
// Construct the SQL query, being careful to suppress the default behaviour of Quote so as to prevent double-escaping.&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `field` LIKE &#039; . $db-&amp;gt;quote( $search, false );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===強固資料安全===&lt;br /&gt;
If data is to be entered into a datetime column then you can use the Joomla API to ensure a valid date format:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$date = JFactory::getDate( $mydate );&lt;br /&gt;
$query = &#039;UPDATE #__table SET `date` = &#039; . $db-&amp;gt;quote( $date-&amp;gt;toMySQL(), false );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that it is necessary to suppress database escaping as legitimate dates may contain characters that should not be escaped.&lt;br /&gt;
&lt;br /&gt;
===強固欄位名稱(field name)安全===&lt;br /&gt;
In the comparatively rare case where a field name is a variable, that should also be quoted using an API call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE &#039; . $db-&amp;gt;quoteName( $field-&amp;gt;name ) . &#039;=&#039; . $db-&amp;gt;quote( $field-&amp;gt;value );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===強固整數陣列安全===&lt;br /&gt;
When you have an array of ids, typically used for IN() queries, you have to sanitise it also with &amp;lt;code&amp;gt; JArrayHelper::toInteger($cid); &amp;lt;/code&amp;gt; before imploding: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
$catId = JArrayHelper::toInteger($catId);&lt;br /&gt;
$query-&amp;gt;where($db-&amp;gt;quoteName(&#039;x.category_id&#039;) . &#039; IN (&#039; . implode(&#039;,&#039;, $catId) . &#039;)&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Quote 以及 QuoteName 的短別名===&lt;br /&gt;
Shorter alternatives to the quote methods may also be used。的語法是相同意思的：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE &#039; . $db-&amp;gt;quoteName( $field-&amp;gt;name ) . &#039;=&#039; . $db-&amp;gt;quote( $field-&amp;gt;value );&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE &#039; . $db-&amp;gt;qn( $field-&amp;gt;name ) . &#039;=&#039; . $db-&amp;gt;q( $field-&amp;gt;value );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==強固表單安全==&lt;br /&gt;
Apart from cleaning input variables as described above, you can also implement a simple technique which makes it more difficult for a cross-site request forgery attack (CSRF) to succeed. This involves adding a randomly-generated unique token to the form which is checked against a copy of the token held in the user&#039;s session.  By checking that the submitted token matches the one contained in the stored session, it is possible to tie a rendered form to the request variables presented.&lt;br /&gt;
&lt;br /&gt;
In POST forms you should add a hidden token field using:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
echo JHTML::_( &#039;form.token&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This outputs the token as a hidden form field looking like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;8cb24ae69ffd7828ccecbcf06056e6fc&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and places a copy of the token into the user&#039;s session, for later checking.&lt;br /&gt;
&lt;br /&gt;
If you need to add the token to a URL rather than a form then you can use something like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
echo JRoute::_( &#039;index.php?option=com_mycomponent&amp;amp;&#039; . JSession::getFormToken() . &#039;=1&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the most common scenario, you will want to check the token following a POST to the form handler.  This can be done by adding this line of code to form handler:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JSession::checkToken() or die( JText::_( &#039;Invalid Token&#039; ) );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you need to pass the token in a GET request then you can check it like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JSession::checkToken( &#039;get&#039; ) or die( JText::_( &#039;Invalid Token&#039; ) );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In both cases the code will die if the token is omitted from the request, or the submitted token does not match the session token.  If the token is correct but has expired, then [[JSession/checkToken|JSession::checkToken]] will automatically redirect to the site front page.&lt;br /&gt;
&lt;br /&gt;
==清理檔案的系統路徑==&lt;br /&gt;
If there is any possibility that a filesystem path might be constructed using data that originated from user input, then the path must be cleaned and checked before being used.  只要像這樣做，很容易就可以：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JPath::check( $path );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will raise an error and terminate Joomla if the path contains a &amp;quot;..&amp;quot; or leads to a location outside the Joomla root directory.  If you want to deal with the error yourself without terminating the application, then you can use code like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$path = JPath::clean( $path );&lt;br /&gt;
if (strpos( $path, JPath::clean( JPATH_ROOT ) ) !== 0) {&lt;br /&gt;
    // Handle the error here.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; [[JPath:clean]] &amp;lt;/code&amp;gt; method 也可以使用於您的程式碼。它僅僅是移除首尾的空白字元，以 double slash (&amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;) 代替；以標準的路徑分隔符號代替double slashes(&amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==清理檔案路徑檔案名稱==&lt;br /&gt;
As with filesystem paths, if there is any possibility that a file name might be constructed using user-originated data, then the file name must be cleaned and checked before use.  像這樣做就可以完成：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
jimport(&#039;joomla.filesystem.file&#039;);&lt;br /&gt;
$clean = JFile::makeSafe( $unclean );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
這個 method 會移除內容中的&amp;quot;.&amp;quot; 或是多個&amp;quot;.&amp;quot; 字元，以及其他非 alphabetic, numeric 或是dot, dash 或是 underscore 字元。如果字串起頭是&amp;quot;.&amp;quot;，也會被移除。&lt;br /&gt;
[[Category:Development/zh-tw]][[Category:Security/zh-tw]]&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Secure_coding_guidelines/45/zh-tw&amp;diff=999293</id>
		<title>Translations:Secure coding guidelines/45/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Secure_coding_guidelines/45/zh-tw&amp;diff=999293"/>
		<updated>2023-02-09T03:02:57Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===強化搜尋安全===&lt;br /&gt;
請特別留意使用 LIKE 的句法，它會包含 % 萬用字元(wildcard character)做出特別的逃逸，為了要避免可能發生的DoS阻斷攻擊。LIKE 句法可以如此來處理：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
//  用逃逸user-supplied string來結構搜尋字詞，並且如果有必要的話，手動加入 % 萬用字元.&lt;br /&gt;
$search = &#039;%&#039; . $db-&amp;gt;escape( $search, true ) . &#039;%&#039;;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Secure_coding_guidelines/zh-tw&amp;diff=999292</id>
		<title>Secure coding guidelines/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Secure_coding_guidelines/zh-tw&amp;diff=999292"/>
		<updated>2023-02-09T02:57:09Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Joomla 包含了很多特色，可以協助在其上開發應用和擴充套件時的安全性。您應該要盡可能地一直使用這些特色功能，因為它們是已經被開發社群嘗試過、檢查過；而且可能還會在未來需要被更新。以下是關於使用 Joomla API最佳實踐的描述，確保您的擴充套件是盡可能安全的。&lt;br /&gt;
&lt;br /&gt;
==使用 request 來獲取資料==&lt;br /&gt;
{{JVer|3.x}} 從Joomla 3.0 版本開始， 應該停止使用&amp;lt;code&amp;gt;[https://api.joomla.org/cms-3/classes/JRequest.html JRequest]&amp;lt;/code&amp;gt;，改成使用&amp;lt;code&amp;gt;[[Retrieving_request_data_using_JInput|JInput]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
所有來自使用者發起的輸入都必須要被視為具有潛在危險的，並且必須要在使用前先做過清理。您應該總是使用 Joomla [[Retrieving_request_data_using_JInput|JInput]] class 來從請求擷取資料，而不是赤裸裸的  &amp;lt;code&amp;gt;$_GET&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$_POST&amp;lt;/code&amp;gt; 或是 &amp;lt;code&amp;gt;$_REQUEST&amp;lt;/code&amp;gt; 變項，因為 &amp;lt;code&amp;gt; JInput &amp;lt;/code&amp;gt; method 預設會過濾用戶的輸入。&amp;lt;code&amp;gt; JInput &amp;lt;/code&amp;gt; 會處理所有方面的用戶請求，讓它獨立於使用的 request method。&amp;lt;code&amp;gt; JInput &amp;lt;/code&amp;gt; 也可以用於獲取 cookie資料，甚至是伺服器和環境變數。然而，非常重要的是，使用正確的[[Retrieving_request_data_using_JInput|JInput]] method，來確保最大的安全性。使用&amp;lt;code&amp;gt; [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] &amp;lt;/code&amp;gt; method ，輔以預設參數是十分容易的，儘管在很多案例中，還可以對使用者的輸入套用更加嚴格的規範。&lt;br /&gt;
&lt;br /&gt;
非常重要的是，要了解 &amp;lt;code&amp;gt; [[Retrieving_request_data_using_JInput|JInput]] &amp;lt;/code&amp;gt;方法並非 SQL-aware，而且需要額外作業來防範 SQL Injection。如果沒有在呼叫 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] 當中指定預設，並沒有預設的值會被取回。假如沒有指定預設的話，而且沒有在請求變數當中顯示 argument，就會取回未定義(undefined)。&lt;br /&gt;
&lt;br /&gt;
使用 [[Retrieving_request_data_using_JInput|JInput]] 也可以消除您需要留意 &amp;lt;code&amp;gt;magic_quotes_gpc &amp;lt;/code&amp;gt; 設定的麻煩。無論您的 &amp;lt;code&amp;gt;magic_quotes_gpc &amp;lt;/code&amp;gt; 有沒有打開，[[Retrieving_request_data_using_JInput|JInput]] 都恪盡職守。請查閱[http://php.net/manual/en/security.magicquotes.php security.magicquotes.php] 以獲得更多資訊。&lt;br /&gt;
&lt;br /&gt;
考慮到用戶的輸入內容，您需要思考關於您要獲取的資料類型，並套用最嚴謹的 &amp;lt;code&amp;gt;[[Retrieving_request_data_using_JInput#Getting_Values|JInput]] &amp;lt;/code&amp;gt;類型，依照每個不同的案例來應用。特定地說，避免使用像是&amp;lt;code&amp;gt;[[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] &amp;lt;/code&amp;gt;的懶惰蟲手段，因為它會取回陣列，當中可能包含您不想要顯示的。儘管這些內容會被清理，它們經常在某些個別 argument 中，被額外的過濾器找到。例如，get 方法會把所有的 arguments 當成字串(string) 來處理，然而它們是可以被限制為整數之類的。&lt;br /&gt;
&lt;br /&gt;
JInput 方法中頭三個參數 (parameter) 是相同的，只有頭一項 parameter 是強制的。一般而言，格式是&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    JFactory::getApplication-&amp;gt;input-&amp;gt;&amp;lt;data-source&amp;gt;-&amp;gt;get&amp;lt;type&amp;gt;( &amp;lt;name&amp;gt;, &amp;lt;default&amp;gt; )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
其中&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| &amp;lt;type&amp;gt; || 可以獲取的資料類型 (在底下查可以使用的類型)。&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;name&amp;gt; || 要獲取的變數(variable)的名稱(name) (例如，在 URL 當中 argument 的名稱name).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;default&amp;gt; || 預設的值&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;lt;data-source&amp;amp;gt; || 指定變數要從何處來獲取 (見底下).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
支援底下的 &amp;amp;lt;data-source&amp;amp;gt; 值:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| get || 由 URL 中 query 的部分送出的資料&lt;br /&gt;
|-&lt;br /&gt;
| post || 從欄位 (field) 送出的資料。&lt;br /&gt;
|-&lt;br /&gt;
| method || The same as either GET or POST depending on how the request was made.&lt;br /&gt;
|-&lt;br /&gt;
| cookie || 在 cookies 中送出的資料。&lt;br /&gt;
|-&lt;br /&gt;
| request || 所有的 GET, POST 以及 COOKIE 合併資料。這是預設的。&lt;br /&gt;
|-&lt;br /&gt;
| files || 關於 POST request 檔案上傳的資訊&lt;br /&gt;
|-&lt;br /&gt;
| env || 環境變數 (platform-specific)&lt;br /&gt;
|-&lt;br /&gt;
| server || 網站伺服器變數 (platform-specific)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
請注意預設會使用 REQUEST，其中包含了 cookie 資料。&lt;br /&gt;
&lt;br /&gt;
以下的段落深入解釋每種資料類型。&lt;br /&gt;
&lt;br /&gt;
===整數===&lt;br /&gt;
以下會接受整數。整數型可以包含一個前導的負號(&amp;lt;code&amp;gt; - &amp;lt;/code&amp;gt;)，但正號(&amp;lt;code&amp;gt; + &amp;lt;/code&amp;gt;)是不允許的。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$integer = JFactory::getApplication-&amp;gt;input-&amp;gt;getInt( &#039;id&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 request 回傳 &amp;quot;id&amp;quot; argument 的值from the request (預設包含所有的 GET, POST and COOKIE data)。預設值是零&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$integer = JFactory::getApplication-&amp;gt;input-&amp;gt;cookie-&amp;gt;getInt( &#039;myId&#039;, 12 );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 cookie 回傳 &amp;quot;myId&amp;quot; 變數的值，預設值是12&lt;br /&gt;
&lt;br /&gt;
===浮點數===&lt;br /&gt;
浮點數型可以包含一個前導的負號(&amp;lt;code&amp;gt; - &amp;lt;/code&amp;gt;)，但正號(&amp;lt;code&amp;gt; + &amp;lt;/code&amp;gt;)是不允許的。如果數字包含了千分位號，那千分位號前頭必須要至少有一個數字。例如，&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$float = JFactory::getApplication-&amp;gt;input-&amp;gt;getFloat( &#039;price&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會回傳請求的 &#039;price&#039; 參數，預設的值是 &amp;quot;0.0&amp;quot;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$float = JFactory::getApplication-&amp;gt;input-&amp;gt;post-&amp;gt;getFloat( &#039;total&#039;, 100.00 );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 POST (而非 GET) 請求回傳 &#039;total&#039; 值。預設的值是 100.00&lt;br /&gt;
&lt;br /&gt;
===布林值===&lt;br /&gt;
所有「非零」的值都會被視為 &#039;true&#039;。零是 &#039;false&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$boolean = JFactory::getApplication-&amp;gt;input-&amp;gt;getBool( &#039;show&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
如果請求 &#039;show&#039; 參數的值是零，上面的程式會回傳 false；而如果是其他的參數，會回傳 1 (true)。預設的值是 false. 請注意任何字串都會造成回傳 true，所以使用URL包含&amp;quot;?show=false&amp;quot; 來呼叫上述的程式，事實上會回傳 true!&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$boolean = JFactory::getApplication-&amp;gt;input-&amp;gt;get-&amp;gt;getBool( &#039;hide&#039;, true );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 GET 請求 (而非 POST) 回傳 &#039;hide&#039; 參數的值。預設的值是 true.&lt;br /&gt;
&lt;br /&gt;
===Word===&lt;br /&gt;
Word 的定義是指使用A到Z組成的字段。在 word 中使用部分小寫的字母是允許的。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$word = JFactory::getApplication-&amp;gt;input-&amp;gt;cookie-&amp;gt;getWord( &#039;search-word&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取由request送出的 &#039;search-word&#039; 的值。預設是空白字串。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$word = JFactory::getApplication-&amp;gt;input-&amp;gt;cookie-&amp;gt;getWord( &#039;keyword&#039;, &#039;&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取 cookie 中 &#039;keyword&#039; 變數的值。預設是空白字串。&lt;br /&gt;
&lt;br /&gt;
===指令(Command)===&lt;br /&gt;
指令(Command) 類似 word 但是允許的字元是更廣泛的。允許的字元包含：all alphanumeric characters, dot, dash (hyphen) and underscore.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$command = JFactory::getApplication-&amp;gt;input-&amp;gt;getCmd( &#039;option&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取由 request 請求回傳的 &amp;quot;option&amp;quot; 值。預設值是空字串。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$command = JFactory::getApplication-&amp;gt;input-&amp;gt;post-&amp;gt;getCmd( &#039;controller&#039;, &#039;view&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取由 POST 請求(而非 GET) &amp;quot;controller&amp;quot; 參數的值。預設值是 &#039;view&#039;&lt;br /&gt;
&lt;br /&gt;
===字串===&lt;br /&gt;
字串型允許更廣泛的字元輸入 It also takes an optional fourth argument specifying some additional mask options.  請查看 [[#Filter options]] for information on the available masks.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$string = JFactory::getApplication-&amp;gt;input-&amp;gt;getString( &#039;description&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取從 request 回傳 &amp;quot;description&amp;quot; 參數的值。預設的值是空字串。輸入的值會清除前後的空白，以及 HTML 標籤。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$string = JFactory::getApplication-&amp;gt;input-&amp;gt;getString( &#039;text&#039;, &#039;&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會獲取從 request 回傳 &amp;quot;text&amp;quot; 參數的值。預設的值是空字串。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$string = JFactory::getApplication-&amp;gt;input-&amp;gt;getString( &#039;template&#039;, &#039;&amp;lt;html /&amp;gt;&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
會從 request 回傳&amp;quot;template&amp;quot;參數的值。預設的值是 &#039;&amp;lt;html /&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
===JSON 字串===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$json = JFactory::getApplication-&amp;gt;input-&amp;gt;json-&amp;gt;get( &#039;var_name&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===通用及其他資料類型===&lt;br /&gt;
如果上述的 methods 您要使用的，還有一些額外的過濾類型，可以直接呼叫 &amp;lt;code&amp;gt;[[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] &amp;lt;/code&amp;gt; method 。語法是：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JFactory::getApplication-&amp;gt;input-&amp;gt;get( &amp;lt;name&amp;gt;, &amp;lt;default&amp;gt;, &amp;lt;type&amp;gt; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
其中的：&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| &amp;lt;name&amp;gt; || the name of the variable to be retrieved (for example, the name of an argument in a URL).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;default&amp;gt; || 預設值。如果沒有在[[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] 呼叫中指定預設值，則沒有預設值會被回傳。&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;type&amp;gt; || 指定的預期資料類型 (見底下)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The first three arguments are the same as for the more specific methods described earlier.  Only the first argument is mandatory.&lt;br /&gt;
&lt;br /&gt;
允許的 &amp;lt;type&amp;gt; 值，大小寫有分別，如底下：&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| INT, INTEGER || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getInt]].&lt;br /&gt;
|-&lt;br /&gt;
| UINT || Get an unsigned integer. 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getUint]].&lt;br /&gt;
|-&lt;br /&gt;
| FLOAT, DOUBLE || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getFloat]].&lt;br /&gt;
|-&lt;br /&gt;
| BOOL, BOOLEAN || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getBool]].&lt;br /&gt;
|-&lt;br /&gt;
| WORD || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getWord]].&lt;br /&gt;
|-&lt;br /&gt;
| ALNUM || 僅允許 alphanumeric 字元 (a-z, A-Z, 0-9). 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getAlnum]].&lt;br /&gt;
|-&lt;br /&gt;
| CMD || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getCmd]].&lt;br /&gt;
|-&lt;br /&gt;
| BASE64 || 僅允許可以被呈現於base64編碼的字元 (也就是 a-z, A-Z, 0-9, /, + 和 =)。相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getBase64]].&lt;br /&gt;
|-&lt;br /&gt;
| STRING || 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getString]].&lt;br /&gt;
|-&lt;br /&gt;
| ARRAY || Source is not filtered but is cast to array type. When using this type you should use JFilterInput directly to filter the values in your data array.&lt;br /&gt;
|-&lt;br /&gt;
| HTML || 經過安全處理的字串，相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getHtml]].&lt;br /&gt;
|-&lt;br /&gt;
| PATH || Valid pathname regex that filters out common attacks.  例如，any path beginning with a &amp;quot;/&amp;quot; will return an empty string.  Simliarly, any path containing &amp;quot;/./&amp;quot; or &amp;quot;/../&amp;quot; will return an empty string.  Dots within filenames are okay though. 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getPath]].&lt;br /&gt;
|-&lt;br /&gt;
| USERNAME || 移除 control 字元 (0x00 - 0x1F), 0x7F, &amp;lt;, &amp;gt;, &amp;quot;, &#039;, % and &amp;amp;. 相當於 [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;getUsername]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===過濾選項===&lt;br /&gt;
所有的輸入值都應該要用&amp;lt;code&amp;gt; JFilterInput-&amp;gt;clean &amp;lt;/code&amp;gt;來過濾&lt;br /&gt;
&lt;br /&gt;
過濾值矩陣&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$data = JFactory::getApplication()-&amp;gt;input-&amp;gt;post-&amp;gt;get(&#039;data&#039;, array(), &#039;array&#039;);&lt;br /&gt;
$filter = JFilterInput::getInstance();&lt;br /&gt;
&lt;br /&gt;
foreach ($data as $value)&lt;br /&gt;
{&lt;br /&gt;
	$array[] = $filter-&amp;gt;clean($value, &#039;string&#039;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
要看更多的過濾類型，請看 [https://github.com/joomla/joomla-cms/blob/master/libraries/joomla/filter/input.php#L115 JFilterInput source].&lt;br /&gt;
&lt;br /&gt;
底下列出的選項是過時的 [[JRequest]] library.&lt;br /&gt;
允許的 &amp;lt;options&amp;gt; 值羅列如下 (預設並不會套用任何一項)：&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| JREQUEST_NOTRIM || 並不會移除字串前後的空白&lt;br /&gt;
|-&lt;br /&gt;
| JREQUEST_ALLOWRAW || 不會套用任何的過濾條件，請絕對謹慎使用！&lt;br /&gt;
|-&lt;br /&gt;
| JREQUEST_ALLOWHTML || 不會移除字串中的 HTML &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Masks can be combined by logically OR&#039;ing them.  如果沒有指定過濾選項，那麼預設會移除空白，並且HTML會被移除。&lt;br /&gt;
&lt;br /&gt;
===上傳檔案===&lt;br /&gt;
關於檔案上傳的安全性，網站伺服器已經提供了不錯的想法，然而，還是需要有些額外的手續，來確保檔案名稱以及路徑不會被濫用。一個簡化過的請求上傳檔案表單看起來像這樣：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_mycomponent/form_handler.php&amp;quot;  method=&amp;quot;post&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;Filedata&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
按下送出按鈕後，瀏覽器將會使用POST請求來上傳檔案，呼叫 Joomla! 的 &amp;lt;code&amp;gt; &amp;quot;components/com_mycomponent/form_handler.php&amp;quot; &amp;lt;/code&amp;gt; 來傳送控制項目這包含了像是以下的程式碼。變項 $somepath 必須要被設定到路徑中，讓網頁伺服器有權限可以建立檔案。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Check to ensure this file is included in Joomla!&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die( &#039;Restricted access&#039; );&lt;br /&gt;
&lt;br /&gt;
// 從 request 獲得檔案資料矩陣&lt;br /&gt;
$file = JFactory::getApplication-&amp;gt;input-&amp;gt;get( &#039;Filedata&#039;, &#039;&#039;, &#039;files&#039;, &#039;array&#039; );&lt;br /&gt;
&lt;br /&gt;
// 讓檔案名稱安全無害&lt;br /&gt;
jimport(&#039;joomla.filesystem.file&#039;);&lt;br /&gt;
$file[&#039;name&#039;] = JFile::makeSafe($file[&#039;name&#039;]);&lt;br /&gt;
&lt;br /&gt;
// 將上傳的檔案移動到常駐位置&lt;br /&gt;
if (isset( $file[&#039;name&#039;] )) {&lt;br /&gt;
&lt;br /&gt;
    // Make sure that the full file path is safe.&lt;br /&gt;
    $filepath = JPath::clean( $somepath.&#039;/&#039;.strtolower( $file[&#039;name&#039;] ) );&lt;br /&gt;
&lt;br /&gt;
    // 移動上傳的檔案&lt;br /&gt;
    JFile::upload( $file[&#039;tmp_name&#039;], $filepath );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Saving a request variable into user state===&lt;br /&gt;
Because setting a user state variable from a variable in the request is such a common operation, there is an API method to make the task easier.  This is generally safe to use because it calls [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] to obtain the input from the request, but remember that none of the input filtering calls will protect against SQL injection attempts.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$app = JFactory::getApplication();&lt;br /&gt;
$app-&amp;gt;getUserStateFromRequest( &amp;lt;key&amp;gt;, &amp;lt;name&amp;gt;, &amp;lt;default&amp;gt;, &amp;lt;type&amp;gt; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
| &amp;lt;key&amp;gt; || the name of the variable in the user state.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;name&amp;gt; || the name of the request variable (same as the first argument of a [[Retrieving_request_data_using_JInput#Getting_Values|JInput-&amp;gt;get]] call).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;default&amp;gt; || the default value to be assigned to the user state variable if the request variable is absent.  The default is null.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;type&amp;gt; || 預期的變數型別&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
例如，getting an integer variable called &#039;id&#039; from the request with a default value of 0, then saving it into a session variable called &#039;myid&#039; can be done like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$app = JFactory::getApplication();&lt;br /&gt;
$app-&amp;gt;getUserStateFromRequest( &#039;myid&#039;, &#039;id, 0, &#039;int&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
instead of something like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$app = JFactory::getApplication();&lt;br /&gt;
$app-&amp;gt;setUserState( &#039;myid&#039;, $app-&amp;gt;input-&amp;gt;getInt( &#039;id&#039;, 0 ) );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==慎重結構 SQL queries==&lt;br /&gt;
SQL Injection 是常見的網站攻擊類型之一，攻擊者會對輸入值管控不良的資料庫，修改資料庫請求的語法來破壞資料庫。攻擊結果會造成資料庫內容被破壞，或是隱私資料外洩。因此，確保SQL語法結構被送出時，能夠被正確地使用 escape 以及 quote 過濾，是很重要的，這樣惡意輸入才不會構成惡意的 SQL 語法。您將不能倚靠[[Retrieving_request_data_using_JInput|JInput]] 方法來完成這件事，因為它並非 SQL-aware。&lt;br /&gt;
&lt;br /&gt;
===強化整數以及其他數字值的安全===&lt;br /&gt;
在 MySQL 資料庫中，數字欄位不應該被 quote，因此，將它們做類型轉換是很重要的。若是沒有這樣處理，您的程式碼會暴露於風險之下，讓駭客在 SQL 資料中存放字串。&lt;br /&gt;
&lt;br /&gt;
依照其類型，數值類型看起來像這樣：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// For SQL data types: INT, INTEGER, TINYINT, SMALLINT, MEDIUMINT, BIGINT, YEAR&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `id`=&#039; . (int) $id;&lt;br /&gt;
&lt;br /&gt;
// For SQL data types: FLOAT, DOUBLE&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `id`=&#039; . (float) $id;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
總是對使用 &amp;lt;cdoe&amp;gt; JInput-&amp;gt;getInt&amp;lt;/code&amp;gt;獲得的變數進行整數型別轉換，絕對是個好習慣。關於 SQL 注入攻擊更進一步的資訊，可以在 http://php.net/manual/en/security.database.sql-injection.php 以及 [[Retrieving_request_data_using_JInput#Getting_Values]] 找到。&lt;br /&gt;
&lt;br /&gt;
===強化字串安全===&lt;br /&gt;
在一個遵循規範的範例中，會假定&amp;lt;code&amp;gt; $db &amp;lt;/code&amp;gt; 是joomla!資料庫物件的 instance 。這可以確保從[https://docs.joomla.org/Using_the_JFactory_class JFactory] 取用，使用&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$db = JFactory::getDBO();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
字串在使用於 SQL 語法之前，一定要先進行清理。這事實上是相當容易的，因為 [https://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_quote JDatabase-&amp;gt;quote] method 已經為您清理所有的可疑內容了。您也可以直接使用 [https://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_escape JDatabase-&amp;gt;escape] method。相當於底下的語法：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `field` = &#039; . $db-&amp;gt;quote( $db-&amp;gt;escape( $field ), false );&lt;br /&gt;
&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `field` = &#039; . $db-&amp;gt;quote( $field );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===強化搜尋安全===&lt;br /&gt;
Special attention should be paid to LIKE clauses which contain the % wildcard character as these require special escaping in order to avoid possible denial of service attacks.  LIKE clauses can be handled like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Construct the search term by escaping the user-supplied string and, if required, adding the % wildcard characters manually.&lt;br /&gt;
$search = &#039;%&#039; . $db-&amp;gt;escape( $search, true ) . &#039;%&#039;;&lt;br /&gt;
&lt;br /&gt;
// Construct the SQL query, being careful to suppress the default behaviour of Quote so as to prevent double-escaping.&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `field` LIKE &#039; . $db-&amp;gt;quote( $search, false );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===強固資料安全===&lt;br /&gt;
If data is to be entered into a datetime column then you can use the Joomla API to ensure a valid date format:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$date = JFactory::getDate( $mydate );&lt;br /&gt;
$query = &#039;UPDATE #__table SET `date` = &#039; . $db-&amp;gt;quote( $date-&amp;gt;toMySQL(), false );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that it is necessary to suppress database escaping as legitimate dates may contain characters that should not be escaped.&lt;br /&gt;
&lt;br /&gt;
===強固欄位名稱(field name)安全===&lt;br /&gt;
In the comparatively rare case where a field name is a variable, that should also be quoted using an API call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE &#039; . $db-&amp;gt;quoteName( $field-&amp;gt;name ) . &#039;=&#039; . $db-&amp;gt;quote( $field-&amp;gt;value );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===強固整數陣列安全===&lt;br /&gt;
When you have an array of ids, typically used for IN() queries, you have to sanitise it also with &amp;lt;code&amp;gt; JArrayHelper::toInteger($cid); &amp;lt;/code&amp;gt; before imploding: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
$catId = JArrayHelper::toInteger($catId);&lt;br /&gt;
$query-&amp;gt;where($db-&amp;gt;quoteName(&#039;x.category_id&#039;) . &#039; IN (&#039; . implode(&#039;,&#039;, $catId) . &#039;)&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Quote 以及 QuoteName 的短別名===&lt;br /&gt;
Shorter alternatives to the quote methods may also be used。的語法是相同意思的：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE &#039; . $db-&amp;gt;quoteName( $field-&amp;gt;name ) . &#039;=&#039; . $db-&amp;gt;quote( $field-&amp;gt;value );&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE &#039; . $db-&amp;gt;qn( $field-&amp;gt;name ) . &#039;=&#039; . $db-&amp;gt;q( $field-&amp;gt;value );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==強固表單安全==&lt;br /&gt;
Apart from cleaning input variables as described above, you can also implement a simple technique which makes it more difficult for a cross-site request forgery attack (CSRF) to succeed. This involves adding a randomly-generated unique token to the form which is checked against a copy of the token held in the user&#039;s session.  By checking that the submitted token matches the one contained in the stored session, it is possible to tie a rendered form to the request variables presented.&lt;br /&gt;
&lt;br /&gt;
In POST forms you should add a hidden token field using:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
echo JHTML::_( &#039;form.token&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This outputs the token as a hidden form field looking like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;8cb24ae69ffd7828ccecbcf06056e6fc&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and places a copy of the token into the user&#039;s session, for later checking.&lt;br /&gt;
&lt;br /&gt;
If you need to add the token to a URL rather than a form then you can use something like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
echo JRoute::_( &#039;index.php?option=com_mycomponent&amp;amp;&#039; . JSession::getFormToken() . &#039;=1&#039; );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the most common scenario, you will want to check the token following a POST to the form handler.  This can be done by adding this line of code to form handler:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JSession::checkToken() or die( JText::_( &#039;Invalid Token&#039; ) );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you need to pass the token in a GET request then you can check it like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JSession::checkToken( &#039;get&#039; ) or die( JText::_( &#039;Invalid Token&#039; ) );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In both cases the code will die if the token is omitted from the request, or the submitted token does not match the session token.  If the token is correct but has expired, then [[JSession/checkToken|JSession::checkToken]] will automatically redirect to the site front page.&lt;br /&gt;
&lt;br /&gt;
==清理檔案的系統路徑==&lt;br /&gt;
If there is any possibility that a filesystem path might be constructed using data that originated from user input, then the path must be cleaned and checked before being used.  只要像這樣做，很容易就可以：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
JPath::check( $path );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will raise an error and terminate Joomla if the path contains a &amp;quot;..&amp;quot; or leads to a location outside the Joomla root directory.  If you want to deal with the error yourself without terminating the application, then you can use code like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$path = JPath::clean( $path );&lt;br /&gt;
if (strpos( $path, JPath::clean( JPATH_ROOT ) ) !== 0) {&lt;br /&gt;
    // Handle the error here.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; [[JPath:clean]] &amp;lt;/code&amp;gt; method 也可以使用於您的程式碼。它僅僅是移除首尾的空白字元，以 double slash (&amp;lt;code&amp;gt;--&amp;lt;/code&amp;gt;) 代替；以標準的路徑分隔符號代替double slashes(&amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==清理檔案路徑檔案名稱==&lt;br /&gt;
As with filesystem paths, if there is any possibility that a file name might be constructed using user-originated data, then the file name must be cleaned and checked before use.  像這樣做就可以完成：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
jimport(&#039;joomla.filesystem.file&#039;);&lt;br /&gt;
$clean = JFile::makeSafe( $unclean );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
這個 method 會移除內容中的&amp;quot;.&amp;quot; 或是多個&amp;quot;.&amp;quot; 字元，以及其他非 alphabetic, numeric 或是dot, dash 或是 underscore 字元。如果字串起頭是&amp;quot;.&amp;quot;，也會被移除。&lt;br /&gt;
[[Category:Development/zh-tw]][[Category:Security/zh-tw]]&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Translations:Secure_coding_guidelines/43/zh-tw&amp;diff=999291</id>
		<title>Translations:Secure coding guidelines/43/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Translations:Secure_coding_guidelines/43/zh-tw&amp;diff=999291"/>
		<updated>2023-02-09T02:56:59Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===強化字串安全===&lt;br /&gt;
在一個遵循規範的範例中，會假定&amp;lt;code&amp;gt; $db &amp;lt;/code&amp;gt; 是joomla!資料庫物件的 instance 。這可以確保從[https://docs.joomla.org/Using_the_JFactory_class JFactory] 取用，使用&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$db = JFactory::getDBO();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
字串在使用於 SQL 語法之前，一定要先進行清理。這事實上是相當容易的，因為 [https://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_quote JDatabase-&amp;gt;quote] method 已經為您清理所有的可疑內容了。您也可以直接使用 [https://api.joomla.org/cms-3/classes/JDatabaseQuery.html#method_escape JDatabase-&amp;gt;escape] method。相當於底下的語法：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &#039;SELECT * FROM #__table WHERE `field` = &#039; . $db-&amp;gt;quote( $db-&amp;gt;escape( $field ), false );&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=What_version_of_Joomla!_should_you_use%3F/zh-tw&amp;diff=999278</id>
		<title>What version of Joomla! should you use?/zh-tw</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=What_version_of_Joomla!_should_you_use%3F/zh-tw&amp;diff=999278"/>
		<updated>2023-02-04T07:20:25Z</updated>

		<summary type="html">&lt;p&gt;Shawnhy: Created page with &amp;quot;zh-tw&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
首先，您應該會想要檢查一下您的網站 [[S:MyLanguage/How to check the Joomla version?|正在執行的 Joomla! 版本]]是哪一個。 &lt;br /&gt;
{{:Joomla! CMS versions/en}}&lt;br /&gt;
&lt;br /&gt;
==包含的外部函示庫==&lt;br /&gt;
{{:External Libraries in Joomla/zh-tw}}&lt;br /&gt;
&lt;br /&gt;
==Joomla! 版本差異說明==&lt;br /&gt;
{{:Release_and_support_cycle/zh-tw}}&lt;br /&gt;
&lt;br /&gt;
==參考及註記==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 1.0 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 1.5 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 1.6 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 1.7 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 2.5 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.0 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.1 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.2 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.3 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.4 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.5 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.6 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.7 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Version 3.8 FAQ/zh-tw]]&lt;br /&gt;
[[Category:Getting Started FAQ/zh-tw]]&lt;br /&gt;
[[Category:Joomla! versions/zh-tw]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawnhy</name></author>
	</entry>
</feed>