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


PHP filesystem::set_wd方法代码示例

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


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

示例1: die

<?php

if (isset($_SERVER['PHP_SELF']) && basename($_SERVER['PHP_SELF']) == "function.viscacha_backend.php") {
    die('Error: Hacking Attempt');
}
// Gets a file with php-functions
@(include_once "classes/function.phpcore.php");
require_once "classes/class.filesystem.php";
$filesystem = new filesystem($config['ftp_server'], $config['ftp_user'], $config['ftp_pw'], $config['ftp_port']);
$filesystem->set_wd($config['ftp_path']);
@(include_once "classes/function.chmod.php");
if ($config['check_filesystem'] == 1) {
    check_writable('admin/data/notes.php');
    check_writable_r('docs');
    check_writable_r('language');
    check_executable_r('admin/backup');
    check_executable_r('admin/data');
    check_executable_r('designs');
    check_executable_r('docs');
    check_executable_r('images');
    check_executable_r('templates');
    check_executable_r('components');
    check_executable_r('language');
    check_executable('classes/cron/jobs');
    check_executable('classes/feedcreator');
    check_executable('classes/fonts');
    check_executable('classes/geshi');
    check_executable('classes/graphic/noises');
    check_writable_r('templates');
}
@ini_set('default_charset', '');
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:function.viscacha_backend.php

示例2: count

<?php

include 'data/config.inc.php';
if (!class_exists('filesystem')) {
    require_once 'install/classes/class.filesystem.php';
    $filesystem = new filesystem($config['ftp_server'], $config['ftp_user'], $config['ftp_pw'], $config['ftp_port']);
    $filesystem->set_wd($config['ftp_path'], $config['fpath'] . DIRECTORY_SEPARATOR . 'install');
}
$tar_packs = array(1 => 'update.admin.tar', 2 => 'update.classes.tar', 3 => 'update.misc.tar', 4 => 'update_rc4.misc.tar');
if (empty($_REQUEST['sub']) || !isset($tar_packs[$_REQUEST['sub']])) {
    $sub = 1;
} else {
    $sub = $_REQUEST['sub'];
}
require 'install/classes/function.chmod.php';
require 'install/classes/class.tar.php';
$tar = new tar(realpath('install/files/'), $tar_packs[$sub]);
$tar->ignore_chmod();
$error = $tar->extract_files('./');
?>
<div class="bfoot">Source file updater - Step <?php 
echo $sub;
?>
 of <?php 
echo count($tar_packs);
?>
 - Currently extracting: <?php 
echo $tar_packs[$sub];
?>
</div>
<?php 
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:3.php


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