我正在用PHP编写一个名为NCIV的系统。在该系统中,您可以更改settings.php中的设置,该设置允许系统的管理员启用或禁用MySQL的使用,而不是一堆文本文件。 但是,如果站点已有内容,则更改该设置将把所有数据从/向MySQL数据库移入/移出基于文本文件的数据库(根据设置的值)。这是代码:
/*******************************************************/
/* __ __ _____ _ _ _____ _ _ _____ */
/* \ \ / /\ | __ \| \ | |_ _| \ | |/ ____| */
/* \ \ /\ / / \ | |__) | \| | | | | \| | | __ */
/* \ \/ \/ / /\ \ | _ /| . ` | | | | . ` | | |_ | */
/* \ /\ / ____ \| | \ \| |\ |_| |_| |\ | |__| | */
/* \/ \/_/ \_\_| \_\_| \_|_____|_| \_|\_____| */
/* */
/* CHANGING ["server"]["mysql"] WHILE THE SITE IS */
/* ALREADY IN USE WILL MIGRATE ALL DATA TO THE */
/* MySQL DATABASE IF TRUE */
/* OR TO THE TEXTUAL DATABASE IF FALSE!! */
/* */
/* IF YOU HAVE A HUGE SITE, THIS CAN TAKE A FEW HOURS */
/* OR EVEN A FEW DAYS OR WEEKS!! */
/* PLEASE ONLY CHANGE THIS SETTING IF YOU HAVE */
/* JUST INSTALLED NCIV! */
/* */
/* */
/* */
/* REMOVING OR MODIFYING THIS WARNING WILL TAKE THE */
/* ENTIRE SITE OFFLINE! */
/* */
/* YOU WILL NEED TO ENTER THE */
/* SERVER'S SUPERUSER/ROOT PASSWORD AFTER CHANGING */
/* THIS SETTING! */
/* */
/* NEVER TRY TO MIGRATE THE DATA MANUALLY! */
/*******************************************************/
$GLOBALS["NCIV"]["server"]["mysql"] = FALSE; //Enable MySQL? See the WARNING above!
有没有办法在设置更改后检查用户是否在PHP中输入了正确的超级用户/ root密码?
提前致谢!
答案 0 :(得分:3)