Manual:importSites.php

From Linux Web Expert

Revision as of 03:55, 16 September 2022 by imported>FuzzyBot (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Rincian

importSites.php adalah skrip pemeliharaan yang mengimpor definisi situs dari berkas XML ke dalam tabel situs.

Argumen

Argumen Deskripsi Diperlukan
file XML file containing site definitions. Use "php://stdin" to read from stdin. <translate> Required</translate>

Penggunaan

php maintenance/importSites.php file
mywikisites.xml
<sites version="1.0" xmlns="http://www.mediawiki.org/xml/sitelist-1.0/">
	<site type="mediawiki">
		<globalid>hewikipedia</globalid>
		<group>wikipedia</group>
		<path type="page_path">https://he.wikipedia.org/index.php/</path>
		<path type="file_path">https://he.wikipedia.org/</path>
	</site>
	<site type="mediawiki">
		<globalid>hiwikipedia</globalid>
		<group>wikipedia</group>
		<path type="page_path">https://hi.wikipedia.org/index.php/</path>
		<path type="file_path">https://hi.wikipedia.org/</path>
	</site>
	<site type="mediawiki">
		<globalid>wikisite1</globalid>
		<group>mywikigroup</group>
		<path type="page_path">https://www.wikisite1.org/index.php/</path>
		<path type="file_path">https://www.wikisite1.org/</path>
	</site>
</sites>
Terminal


Galat yang umum

Failed to open $file for writing.

This error occurs when the file does not exist or the user running the script does not have permission to read the file.

If the file does exist, check the file permissions. If you are a root user, you can run the script with sudo.

Lihat pula