本文整理匯總了PHP中DupUtil::string_has_value方法的典型用法代碼示例。如果您正苦於以下問題:PHP DupUtil::string_has_value方法的具體用法?PHP DupUtil::string_has_value怎麽用?PHP DupUtil::string_has_value使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DupUtil
的用法示例。
在下文中一共展示了DupUtil::string_has_value方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: file_put_contents
# END WordPress
HTACCESS;
file_put_contents('.htaccess', $tmp_htaccess);
DupUtil::log("created basic .htaccess file. If using IIS web.config this process will need to be done manually.");
DupUtil::log("updated .htaccess file.");
} else {
DupUtil::log("web configuration file was not renamed because the paths did not change.");
}
//===============================
//WARNING TESTS
//===============================
DupUtil::log("\n--------------------------------------");
DupUtil::log("WARNINGS");
DupUtil::log("--------------------------------------");
$config_vars = array('WP_CONTENT_DIR', 'WP_CONTENT_URL');
$config_found = DupUtil::string_has_value($config_vars, $config_file);
//Files
if ($config_found) {
$msg = 'WP-CONFIG WARNING: The wp-config.php has one or more of these values "' . implode(", ", $config_vars) . '" which may cause issues please validate these values by opening the file.';
$JSON['step2']['warnlist'][] = $msg;
DupUtil::log($msg);
}
//Database
$result = @mysqli_query($dbh, "SELECT option_value FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name IN ('upload_url_path','upload_path')");
if ($result) {
while ($row = mysqli_fetch_row($result)) {
if (strlen($row[0])) {
$msg = "MEDIA SETTINGS WARNING: The table '{$GLOBALS['FW_TABLEPREFIX']}options' has at least one the following values ['upload_url_path','upload_path'] set please validate settings. These settings can be changed in the wp-admin by going to Settings->Media area see 'Uploading Files'";
$JSON['step2']['warnlist'][] = $msg;
DupUtil::log($msg);
break;