本文整理汇总了PHP中FileHelper::copyToLocation方法的典型用法代码示例。如果您正苦于以下问题:PHP FileHelper::copyToLocation方法的具体用法?PHP FileHelper::copyToLocation怎么用?PHP FileHelper::copyToLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileHelper
的用法示例。
在下文中一共展示了FileHelper::copyToLocation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: number_format
$filecreatedcount_format = number_format($filecreatedcount);
$totallinescalculated_format = number_format($totallinescalculated);
// Connect to database
$database = new Database(HOST, DBNAME, DBUSER, DBPASS);
// Posted data
$posted_date = date('Y-m-d H:i:s');
// Insert into database
$varObject->description = str_replace("'", "\\'", $varObject->description);
$create_package_record = array('uid' => $_SESSION['uid'], 'midparent' => $varObject->midparent, 'm_name' => $varObject->name, 'm_file_name' => $varObject->filename, 'version' => $varObject->version, 'jversion' => $varObject->jversion, 'brversion' => $varObject->brversion, 'description' => $varObject->description, 'license' => $varObject->license, 'copyright' => $varObject->copyright, 'author' => $varObject->author, 'author_email' => $varObject->author_email, 'author_url' => $varObject->author_url, 'date_created' => $posted_date, 'filesize' => $bytes, 'lines_created' => $totallinescalculated, 'files_created' => $filecreatedcount, 'minutes_saved' => $totaltimesaved, 'download_count' => 1);
$mid = $database->insert('br_modules', $create_package_record);
$filesize = FileHelper::formatBytes($bytes);
// Move to user folder from tmp
$userfolder = $folderusersmodules . $mid . DS;
FileHelper::foldercheck($userfolder);
FileHelper::createfile($userfolder . $indexfile, $indexlines);
FileHelper::copyToLocation($folderusersmodulestmp . $packagename, $userfolder . $packagename);
$filecreatedpath = BASE_URL . 'users' . DS . $_SESSION['uid'] . DS . 'modules' . DS . $mid . DS . $packagename;
// Clean up tmp folder now that zip has been created
FileHelper::deleteDir($folderusersmodulestmp);
// account for hours in display..
if ($totaltimesaved > 60) {
}
// Set permissions of paths
chmod($folderusersmodules, 0777);
chmod($userfolder, 0777);
// Call header
$pageTitle = 'Module Created | Free | Joomla 2.5 & Joomla 3.0';
$pageActive = 'modules';
$pageActiveBreadcrumb = '<li class="active">Module Created</li>';
include 'template/header.php';
?>
示例2: foreach
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'CorrectGamma.php', $adminassetswideimageoperation . 'CorrectGamma.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'Crop.php', $adminassetswideimageoperation . 'Crop.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'Flip.php', $adminassetswideimageoperation . 'Flip.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'GetMask.php', $adminassetswideimageoperation . 'GetMask.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'Merge.php', $adminassetswideimageoperation . 'Merge.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'Mirror.php', $adminassetswideimageoperation . 'Mirror.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'Resize.php', $adminassetswideimageoperation . 'Resize.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'ResizeCanvas.php', $adminassetswideimageoperation . 'ResizeCanvas.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'Rotate.php', $adminassetswideimageoperation . 'Rotate.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'RoundCorners.php', $adminassetswideimageoperation . 'RoundCorners.php');
FileHelper::copyToLocation($toolsfolderwideimageoperation . 'Unsharp.php', $adminassetswideimageoperation . 'Unsharp.php');
FileHelper::copyToLocation($toolsfolderwideimage . 'OperationFactory.php', $adminassetswideimage . 'OperationFactory.php');
FileHelper::copyToLocation($toolsfolderwideimage . 'PaletteImage.php', $adminassetswideimage . 'PaletteImage.php');
FileHelper::copyToLocation($toolsfolderwideimage . 'TrueColorImage.php', $adminassetswideimage . 'TrueColorImage.php');
FileHelper::copyToLocation($toolsfolderwideimagevendorde77 . 'BMP.php', $adminassetswideimagevendorde77 . 'BMP.php');
FileHelper::copyToLocation($toolsfolderwideimagevendorde77 . 'TGA.php', $adminassetswideimagevendorde77 . 'TGA.php');
}
// Create index files under all paths
foreach ($indexpaths as $indexpath) {
$totallinescreated[] = FileHelper::createfile($indexpath, $indexlines);
$filestozip[] = $indexpath;
}
// start - added v.0.6.0
if ($varObject->useDatabase) {
$sqlinstallfilelines = array();
$sqluninstallfilelines = array();
// Install & Uninstall array parse and build file
if (is_array($sqlinstallfilelinesarray)) {
foreach ($sqlinstallfilelinesarray as $sqlinstallfilegroup) {
foreach ($sqlinstallfilegroup as $sqlinstallfileline) {
$sqlinstallfilelines[] = $sqlinstallfileline;