当前位置: 首页>>代码示例>>PHP>>正文


PHP DUPX_Log::Info方法代码示例

本文整理汇总了PHP中DUPX_Log::Info方法的典型用法代码示例。如果您正苦于以下问题:PHP DUPX_Log::Info方法的具体用法?PHP DUPX_Log::Info怎么用?PHP DUPX_Log::Info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DUPX_Log的用法示例。


在下文中一共展示了DUPX_Log::Info方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Setup

    /** METHOD: ResetHTACCESS
     *  Resetst the .htaccess file
     */
    public static function Setup()
    {
        if (!isset($_POST['url_new'])) {
            return;
        }
        DUPX_Log::Info("\nWEB SERVER CONFIGURATION FILE BASIC SETUP:");
        $currdata = parse_url($_POST['url_old']);
        $newdata = parse_url($_POST['url_new']);
        $currpath = DupUtil::add_slash(isset($currdata['path']) ? $currdata['path'] : "");
        $newpath = DupUtil::add_slash(isset($newdata['path']) ? $newdata['path'] : "");
        $tmp_htaccess = <<<HTACCESS
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase {$newpath}
RewriteRule ^index\\.php\$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . {$newpath}index.php [L]
</IfModule>
# END WordPress
HTACCESS;
        file_put_contents('.htaccess', $tmp_htaccess);
        @chmod('.htaccess', 0644);
        DUPX_Log::Info("created basic .htaccess file.  If using IIS web.config this process will need to be done manually.");
    }
开发者ID:renztoygwapo,项目名称:lincoln,代码行数:29,代码来源:class.config.php

示例2: UpdateStep1

 /** 
  * Updates the web server config files in Step 1  */
 public static function UpdateStep1()
 {
     if (!file_exists('wp-config.php')) {
         return;
     }
     $root_path = DUPX_Util::set_safe_path($GLOBALS['CURRENT_ROOT_PATH']);
     $wpconfig = @file_get_contents('wp-config.php', true);
     $patterns = array("/'DB_NAME',\\s*'.*?'/", "/'DB_USER',\\s*'.*?'/", "/'DB_PASSWORD',\\s*'.*?'/", "/'DB_HOST',\\s*'.*?'/");
     $db_host = $_POST['dbport'] == 3306 ? $_POST['dbhost'] : "{$_POST['dbhost']}:{$_POST['dbport']}";
     $replace = array("'DB_NAME', " . '\'' . $_POST['dbname'] . '\'', "'DB_USER', " . '\'' . $_POST['dbuser'] . '\'', "'DB_PASSWORD', " . '\'' . DUPX_Util::preg_replacement_quote($_POST['dbpass']) . '\'', "'DB_HOST', " . '\'' . $db_host . '\'');
     //SSL CHECKS
     if ($_POST['ssl_admin']) {
         if (!strstr($wpconfig, 'FORCE_SSL_ADMIN')) {
             $wpconfig = $wpconfig . PHP_EOL . "define('FORCE_SSL_ADMIN', true);";
         }
     } else {
         array_push($patterns, "/'FORCE_SSL_ADMIN',\\s*true/");
         array_push($replace, "'FORCE_SSL_ADMIN', false");
     }
     if ($_POST['ssl_login']) {
         if (!strstr($wpconfig, 'FORCE_SSL_LOGIN')) {
             $wpconfig = $wpconfig . PHP_EOL . "define('FORCE_SSL_LOGIN', true);";
         }
     } else {
         array_push($patterns, "/'FORCE_SSL_LOGIN',\\s*true/");
         array_push($replace, "'FORCE_SSL_LOGIN', false");
     }
     //CACHE CHECKS
     if ($_POST['cache_wp']) {
         if (!strstr($wpconfig, 'WP_CACHE')) {
             $wpconfig = $wpconfig . PHP_EOL . "define('WP_CACHE', true);";
         }
     } else {
         array_push($patterns, "/'WP_CACHE',\\s*true/");
         array_push($replace, "'WP_CACHE', false");
     }
     if (!$_POST['cache_path']) {
         array_push($patterns, "/'WPCACHEHOME',\\s*'.*?'/");
         array_push($replace, "'WPCACHEHOME', ''");
     }
     if (!is_writable("{$root_path}/wp-config.php")) {
         if (file_exists("{$root_path}/wp-config.php")) {
             chmod("{$root_path}/wp-config.php", 0644) ? DUPX_Log::Info('File Permission Update: wp-config.php set to 0644') : DUPX_Log::Info('WARNING: Unable to update file permissions and write to wp-config.php.  Please visit the online FAQ for setting file permissions and work with your hosting provider or server administrator to enable this installer.php script to write to the wp-config.php file.');
         } else {
             DUPX_Log::Info('WARNING: Unable to locate wp-config.php file.  Be sure the file is present in your archive.');
         }
     }
     $wpconfig = preg_replace($patterns, $replace, $wpconfig);
     file_put_contents('wp-config.php', $wpconfig);
     $wpconfig = null;
 }
开发者ID:netmagik,项目名称:netmagik,代码行数:53,代码来源:class.conf.wp.php

示例3: LIKE

    DUPX_Log::Error("No tables where created during step 1 of the install.  Please review the installer-log.txt file for sql error messages.\n\t\tYou may have to manually run the installer-data.sql with a tool like phpmyadmin to validate the data input.  If you have enabled compatibility mode\n\t\tduring the package creation process then the database server version your using may not be compatible with this script.\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_packages`");
$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);
DUPX_Log::Info("Removed '{$dbdelete_count}' cache/transient rows");
//Reset Duplicator Options
foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
    mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
}
@mysqli_close($dbh);
$profile_end = DupUtil::get_microtime();
DUPX_Log::Info("\nSECTION RUNTIME: " . DupUtil::elapsed_time($profile_end, $profile_start));
//FINAL RESULTS
$ajax1_end = DupUtil::get_microtime();
$ajax1_sum = DupUtil::elapsed_time($ajax1_end, $ajax1_start);
DUPX_Log::Info("\n{$GLOBALS['SEPERATOR1']}");
DUPX_Log::Info('STEP1 COMPLETE @ ' . @date('h:i:s') . " - TOTAL RUNTIME: {$ajax1_sum}");
DUPX_Log::Info("{$GLOBALS['SEPERATOR1']}");
$JSON['pass'] = 1;
$JSON['table_count'] = $dbtable_count;
$JSON['table_rows'] = $dbtable_rows;
$JSON['query_errs'] = $dbquery_errs;
echo json_encode($JSON);
error_reporting($ajax1_error_level);
die('');
开发者ID:DIESELOK,项目名称:GH-Frontend-5,代码行数:31,代码来源:ajax.step1.php

示例4: 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) {
         DUPX_Log::Info("\nRECURSIVE UNSERIALIZE ERROR: With string\n" . $error, 2);
     }
     return $data;
 }
开发者ID:healthcommcore,项目名称:osnap,代码行数:43,代码来源:class.serializer.php

示例5: IN

    $JSON['step2']['warnlist'][] = $msg;
    DUPX_Log::Info($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;
            DUPX_Log::Info($msg);
            break;
        }
    }
}
if (empty($JSON['step2']['warnlist'])) {
    DUPX_Log::Info("No Warnings Found\n");
}
$JSON['step2']['warn_all'] = empty($JSON['step2']['warnlist']) ? 0 : count($JSON['step2']['warnlist']);
mysqli_close($dbh);
@unlink('database.sql');
//CONFIG Setup
DUPX_Config::Setup();
$ajax2_end = DupUtil::get_microtime();
$ajax2_sum = DupUtil::elapsed_time($ajax2_end, $ajax2_start);
DUPX_Log::Info("********************************************************************************");
DUPX_Log::Info('STEP 2 COMPLETE @ ' . @date('h:i:s') . " - TOTAL RUNTIME: {$ajax2_sum}");
DUPX_Log::Info("********************************************************************************");
$JSON['step2']['pass'] = 1;
error_reporting($ajax2_error_level);
die(json_encode($JSON));
开发者ID:ICONVI,项目名称:sigmacatweb,代码行数:31,代码来源:ajax.step2.php

示例6: 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. 
  */
 public 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);
             /* CJL
             				Check for an update to the key of an array e.g.   [http://localhost/projects/wpplugins/] => 1.41
             				This could have unintended consequences would need to enable with full-search needs more testing
             			if (array_key_exists($from, $data)) 
             			{
             				$data[$to] = $data[$from];
             				unset($data[$from]);
             			}*/
         } elseif (is_object($data)) {
             /* RSR Old logic that didn't work with Beaver Builder - they didn't want to create a brand new 
             			object instead reused the existing one... 
             			$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);*/
             // RSR NEW LOGIC
             $_tmp = $data;
             $props = get_object_vars($data);
             foreach ($props 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) {
         DUPX_Log::Info("\nRECURSIVE UNSERIALIZE ERROR: With string\n" . $error, 2);
     }
     return $data;
 }
开发者ID:netmagik,项目名称:netmagik,代码行数:61,代码来源:class.serializer.php


注:本文中的DUPX_Log::Info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。