本文整理汇总了PHP中DupUtil::log方法的典型用法代码示例。如果您正苦于以下问题:PHP DupUtil::log方法的具体用法?PHP DupUtil::log怎么用?PHP DupUtil::log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DupUtil
的用法示例。
在下文中一共展示了DupUtil::log方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ResetWebConfig
/** METHOD: ResetWebConfig
* Resetst the IIS web.config file
*/
public static function ResetWebConfig()
{
if (self::isPathNew()) {
DupUtil::log("WEB.CONFIG CHANGES:");
@copy('web.config', 'web.config.orig');
@unlink('web.config');
DupUtil::log("created backup of original web.config to web.config.orig");
DupUtil::log("If using IIS web.config this process will need to be done manually.");
} else {
DupUtil::log("web.config file was not reset because the old url and new url paths did not change (IIS Only).");
}
}
示例2: recursive_unserialize_replace
/**
* Take a serialised array and unserialise it replacing elements and
* unserialising any subordinate arrays and performing the replace.
* @param string $from String we're looking to replace.
* @param string $to What we want it to be replaced with
* @param array $data Used to pass any subordinate arrays back to in.
* @param bool $serialised Does the array passed via $data need serialising.
* @return array The original array with all elements replaced as needed.
*/
private static function recursive_unserialize_replace($from = '', $to = '', $data = '', $serialised = false)
{
// some unseriliased data cannot be re-serialised eg. SimpleXMLElements
try {
if (is_string($data) && ($unserialized = @unserialize($data)) !== false) {
$data = self::recursive_unserialize_replace($from, $to, $unserialized, true);
} elseif (is_array($data)) {
$_tmp = array();
foreach ($data as $key => $value) {
$_tmp[$key] = self::recursive_unserialize_replace($from, $to, $value, false);
}
$data = $_tmp;
unset($_tmp);
} elseif (is_object($data)) {
$dataClass = get_class($data);
$_tmp = new $dataClass();
foreach ($data as $key => $value) {
$_tmp->{$key} = self::recursive_unserialize_replace($from, $to, $value, false);
}
$data = $_tmp;
unset($_tmp);
} else {
if (is_string($data)) {
$data = str_replace($from, $to, $data);
}
}
if ($serialised) {
return serialize($data);
}
} catch (Exception $error) {
DupUtil::log("\nRECURSIVE UNSERIALIZE ERROR: With string\n" . $data, 2);
}
return $data;
}
示例3: LIKE
$dbtable_count++;
}
@mysqli_free_result($result);
}
if ($dbtable_count == 0) {
DupUtil::log("NOTICE: You may have to manually run the installer-data.sql to validate data input. Also check to make sure your installer file is correct and the\r\n\t\ttable prefix '{$GLOBALS['FW_TABLEPREFIX']}' is correct for this particular version of WordPress. \n");
}
//DATA CLEANUP: Perform Transient Cache Cleanup
//Remove all duplicator entries and record this one since this is a new install.
$dbdelete_count = 0;
@mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}duplicator`");
$dbdelete_count1 = @mysqli_affected_rows($dbh) or 0;
@mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` LIKE ('_transient%') OR `option_name` LIKE ('_site_transient%')");
$dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
$dbdelete_count = abs($dbdelete_count1) + abs($dbdelete_count2);
DupUtil::log("Removed '{$dbdelete_count}' cache/transient rows");
@mysqli_close($dbh);
$profile_end = DupUtil::get_microtime();
DupUtil::log("\nSECTION RUNTIME: " . DupUtil::elapsed_time($profile_end, $profile_start));
$ajax1_end = DupUtil::get_microtime();
$ajax1_sum = DupUtil::elapsed_time($ajax1_end, $ajax1_start);
DupUtil::log("\n{$GLOBALS['SEPERATOR1']}");
DupUtil::log('STEP1 COMPLETE @ ' . @date('h:i:s') . " - TOTAL RUNTIME: {$ajax1_sum}");
DupUtil::log("{$GLOBALS['SEPERATOR1']}");
$JSON['pass'] = 1;
$JSON['table_count'] = $dbtable_count;
$JSON['table_rows'] = $dbquery_rows - ($dbtable_count + $dbdelete_count + $dbquery_errs);
$JSON['query_errs'] = $dbquery_errs;
echo json_encode($JSON);
error_reporting($ajax1_error_level);
die('');