本文整理汇总了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', '');
示例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