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


PHP DUP_Util::IsShellExecAvailable方法代码示例

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


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

示例1: GetMySqlDumpPath

 /**
  * Returns the mysqldump path if the server is enabled to execute it
  * @return boolean|string
  */
 public static function GetMySqlDumpPath()
 {
     //Is shell_exec possible
     if (!DUP_Util::IsShellExecAvailable()) {
         return false;
     }
     $custom_mysqldump_path = DUP_Settings::Get('package_mysqldump_path');
     $custom_mysqldump_path = strlen($custom_mysqldump_path) ? $custom_mysqldump_path : '';
     //Common Windows Paths
     if (DUP_Util::IsOSWindows()) {
         $paths = array($custom_mysqldump_path, 'C:/xampp/mysql/bin/mysqldump.exe', 'C:/Program Files/xampp/mysql/bin/mysqldump', 'C:/Program Files/MySQL/MySQL Server 6.0/bin/mysqldump', 'C:/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump', 'C:/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump', 'C:/Program Files/MySQL/MySQL Server 5.1/bin/mysqldump', 'C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump');
         //Common Linux Paths
     } else {
         $path1 = '';
         $path2 = '';
         $mysqldump = `which mysqldump`;
         if (@is_executable($mysqldump)) {
             $path1 = !empty($mysqldump) ? $mysqldump : '';
         }
         $mysqldump = dirname(`which mysql`) . "/mysqldump";
         if (@is_executable($mysqldump)) {
             $path2 = !empty($mysqldump) ? $mysqldump : '';
         }
         $paths = array($custom_mysqldump_path, $path1, $path2, '/usr/local/bin/mysqldump', '/usr/local/mysql/bin/mysqldump', '/usr/mysql/bin/mysqldump', '/usr/bin/mysqldump', '/opt/local/lib/mysql6/bin/mysqldump', '/opt/local/lib/mysql5/bin/mysqldump', '/opt/local/lib/mysql4/bin/mysqldump');
     }
     // Find the one which works
     foreach ($paths as $path) {
         if (@is_executable($path)) {
             return $path;
         }
     }
     return false;
 }
开发者ID:aaronfrey,项目名称:PepperLillie-TAT,代码行数:37,代码来源:package.database.php

示例2: _e

				<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php 
_e("Max Execution Time", 'wpduplicator');
?>
</a></td>
				<td><?php 
echo @ini_get('max_execution_time');
?>
</td>
			</tr>
			<tr>
				<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php 
_e("Shell Exec", 'wpduplicator');
?>
</a></td>
				<td><?php 
echo DUP_Util::IsShellExecAvailable() ? _e("Is Supported", 'wpduplicator') : _e("Not Supported", 'wpduplicator');
?>
</td>
			</tr>
			<tr>
				<td class='dup-settings-diag-header' colspan="2">MySQL</td>
			</tr>					   
			<tr>
				<td><?php 
_e("Version", 'wpduplicator');
?>
</td>
				<td><?php 
echo $wpdb->db_version();
?>
</td>
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:diagnostics.php

示例3: foreach

						<?php 
foreach ($phpdump_chunkopts as $value) {
    $selected = $package_phpdump_qrylimit == $value ? "selected='selected'" : '';
    echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
}
?>
					</select>
					 <i style="font-size:12px">(<?php 
_e("higher values speed up build times but uses more memory", 'wpduplicator');
?>
)</i> 
					
				</div><br/>

                <?php 
if (!DUP_Util::IsShellExecAvailable()) {
    ?>
                    <p class="description">
                        <?php 
    _e("This server does not have shell_exec configured to run.", 'wpduplicator');
    echo '<br/>';
    _e("Please contact the server administrator to enable this feature.", 'wpduplicator');
    ?>
                    </p>
                <?php 
} else {
    ?>
                    <input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php 
    echo $package_mysqldump ? 'checked="checked"' : '';
    ?>
 />
开发者ID:ICONVI,项目名称:sigmacatweb,代码行数:31,代码来源:general.php


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