本文整理汇总了PHP中wpsc_recursive_copy函数的典型用法代码示例。如果您正苦于以下问题:PHP wpsc_recursive_copy函数的具体用法?PHP wpsc_recursive_copy怎么用?PHP wpsc_recursive_copy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpsc_recursive_copy函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wpsc_recursive_copy
/**
* wpsc_recursive_copy function, copied from here and renamed: http://nz.php.net/copy
* Why doesn't PHP have one of these built in?
*/
function wpsc_recursive_copy($src, $dst)
{
$dir = opendir($src);
@mkdir($dst);
while (false !== ($file = readdir($dir))) {
if ($file != '.' && $file != '..') {
if (is_dir($src . '/' . $file)) {
wpsc_recursive_copy($src . '/' . $file, $dst . '/' . $file);
} else {
@copy($src . '/' . $file, $dst . '/' . $file);
}
}
}
closedir($dir);
}
开发者ID:BGCX261,项目名称:zombie-craft-svn-to-git,代码行数:19,代码来源:misc.functions.php
示例2: wpsc_backup_theme
function wpsc_backup_theme()
{
$wp_theme_path = get_stylesheet_directory();
wpsc_recursive_copy($wp_theme_path, WPSC_THEME_BACKUP_DIR);
$_SESSION['wpsc_themes_backup'] = true;
$sendback = wp_get_referer();
wp_redirect($sendback);
exit;
}
开发者ID:osuarcher,项目名称:WP-e-Commerce,代码行数:9,代码来源:init.php
示例3: wpsc_copy_themes_to_uploads
function wpsc_copy_themes_to_uploads()
{
$old_theme_path = WPSC_CORE_THEME_PATH;
$new_theme_path = WPSC_THEMES_PATH;
$new_dir = @opendir($new_theme_path);
$num = 0;
$file_names = array();
while (($file = @readdir($new_dir)) !== false) {
if (is_dir($new_theme_path . $file) && $file != ".." && $file != ".") {
$file_names[] = $file;
}
}
if (count($file_names) < 1) {
$old_dir = @opendir($old_theme_path);
while (($file = @readdir($old_dir)) !== false) {
if (is_dir($old_theme_path . $file) && $file != ".." && $file != ".") {
@wpsc_recursive_copy($old_theme_path . $file, $new_theme_path . $file);
}
}
}
}
开发者ID:osuarcher,项目名称:WP-e-Commerce,代码行数:21,代码来源:wpsc-installer.php
示例4: wpsc_test_copying_themes
function wpsc_test_copying_themes()
{
if (!current_user_can('manage_options')) {
wp_die("You don't look like an administrator.");
}
$new_dir = @opendir(WPSC_THEMES_PATH);
$num = 0;
$file_names = array();
while (false !== ($file = @readdir($new_dir))) {
if (is_dir(WPSC_THEMES_PATH . $file) && $file != ".." && $file != ".") {
$file_names[] = $file;
}
}
if (count($file_names) < 1) {
$old_dir = @opendir(WPSC_CORE_THEME_PATH);
while (($file = @readdir($old_dir)) !== false) {
if (is_dir(WPSC_CORE_THEME_PATH . $file) && $file != ".." && $file != ".") {
$success = wpsc_recursive_copy(WPSC_CORE_THEME_PATH . $file, WPSC_THEMES_PATH . $file);
echo "old_file:" . WPSC_CORE_THEME_PATH . $file . "<br />";
echo "new_file:" . WPSC_THEMES_PATH . $file . "<br />";
echo "<pre>" . print_r($success, true) . "</pre>";
}
}
}
}
开发者ID:hornet9,项目名称:Morato,代码行数:25,代码来源:display-debug.page.php
示例5: wpsc_test_copying_themes
function wpsc_test_copying_themes()
{
$old_theme_path = WPSC_FILE_PATH . "/themes/";
$new_theme_path = WPSC_THEMES_PATH;
$new_dir = @opendir($new_theme_path);
$num = 0;
$file_names = array();
while (($file = @readdir($new_dir)) !== false) {
if (is_dir($new_theme_path . $file) && $file != ".." && $file != ".") {
$file_names[] = $file;
}
}
if (count($file_names) < 1) {
$old_dir = @opendir($old_theme_path);
while (($file = @readdir($old_dir)) !== false) {
if (is_dir($old_theme_path . $file) && $file != ".." && $file != ".") {
$success = wpsc_recursive_copy($old_theme_path . $file, $new_theme_path . $file);
echo "old_file:" . $old_theme_path . $file . "<br />";
echo "new_file:" . $new_theme_path . $file . "<br />";
echo "<pre>" . print_r($success, true) . "</pre>";
}
}
}
}
开发者ID:BGCX261,项目名称:zombie-craft-svn-to-git,代码行数:24,代码来源:display-debug.page.php
注:本文中的wpsc_recursive_copy函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论