标签:function rect die sep dump put word open func
<?php
$data=‘<?php if ( ! defined(\‘BASEPATH\‘)) exit(\‘No direct script access allowed\‘);
$active_group = \‘default\‘;
$active_record = TRUE;
//DB
$db[\‘default\‘][\‘hostname\‘] = \‘localhost\‘;
$db[\‘default\‘][\‘port\‘] = \‘3306\‘;
$db[\‘default\‘][\‘username\‘] = \‘root\‘;
$db[\‘default\‘][\‘password\‘] = \‘\‘;
$db[\‘default\‘][\‘database\‘] = \‘aa2\‘;
$db[\‘default\‘][\‘dbdriver\‘] = \‘mysql\‘;
$db[\‘default\‘][\‘dbprefix\‘] = \‘\‘;
$db[\‘default\‘][\‘pconnect\‘] = TRUE;
$db[\‘default\‘][\‘db_debug\‘] = FALSE;
$db[\‘default\‘][\‘cache_on\‘] = FALSE;
$db[\‘default\‘][\‘cachedir\‘] = \‘\‘;
$db[\‘default\‘][\‘char_set\‘] = \‘utf8\‘;
$db[\‘default\‘][\‘dbcollat\‘] = \‘utf8_general_ci\‘;
$db[\‘default\‘][\‘swap_pre\‘] = \‘\‘;
$db[\‘default\‘][\‘autoinit\‘] = TRUE;
$db[\‘default\‘][\‘stricton\‘] = FALSE;
‘;
file_put_contents("test.html", $data);
die;
echo "<pre>";var_dump($_SERVER);exit;
function copy_dir($src,$dst) {
$dir = opendir($src);
@mkdir($dst);
while(false !== ( $file = readdir($dir)) ) {
if (( $file != ‘.‘ ) && ( $file != ‘..‘ )) {
if ( is_dir($src . ‘/‘ . $file) ) {
copy_dir($src . ‘/‘ . $file,$dst . ‘/‘ . $file);
continue;
}
else {
copy($src . ‘/‘ . $file,$dst . ‘/‘ . $file);
}
}
}
closedir($dir);
}
define("ROOT",dirname(dirname(dirname(__FILE__))));
echo "<pre>";var_dump(ROOT);exit;
echo "begin";
copy_dir(‘./ych‘,‘./ych2‘);
echo "done";
//echo copy("./y4","y5");
写配置文件
标签:function rect die sep dump put word open func
原文地址:http://www.cnblogs.com/csjoz/p/7244071.html