pclziputilrename [ WordPress Function ]
pclziputilrename ( $p_src, $p_dest )
| Defined at: |
|
Benzer Fonksiyonlar: pclziputiloptiontext, pclziputilpathreduction, pclziputiltranslatewinpath, plugin_basename, pclziputilcopyblock
No description yet.
Source
<?php
function PclZipUtilRename($p_src, $p_dest)
{
$v_result = 1;
// ----- Try to rename the files
if (!@rename($p_src, $p_dest)) {
// ----- Try to copy & unlink the src
if (!@copy($p_src, $p_dest)) {
$v_result = 0;
}
else if (!@unlink($p_src)) {
$v_result = 0;
}
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : PclZipUtilOptionText()
// Description :
// Translate option value in text. Mainly for debug purpose.
// Parameters :
// $p_option : the option value.
// Return Values :
// The option text value.
// --------------------------------------------------------------------------------
function PclZipUtilOptionText($p_option)
{
$v_list = get_defined_constants();
for (reset($v_list); $v_key = key($v_list); next($v_list)) {
$v_prefix = substr($v_key, 0, 10);
if (( ($v_prefix == 'PCLZIP_OPT')
|| ($v_prefix == 'PCLZIP_CB_')
|| ($v_prefix == 'PCLZIP_ATT'))
&& ($v_list[$v_key] == $p_option)) {
return $v_key;
}
}
$v_result = 'Unknown';
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : PclZipUtilTranslateWinPath()
// Description :
// Translate windows path by replacing '\' by '/' and optionally removing
// drive letter.
// Parameters :
// $p_path : path to translate.
// $p_remove_disk_letter : true | false
// Return Values :
// The path translated.
// --------------------------------------------------------------------------------
function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true)
{
if (stristr(php_uname(), 'windows')) {
// ----- Look for potential disk letter
if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
$p_path = substr($p_path, $v_position+1);
}
// ----- Change potential windows directory separator
if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
$p_path = strtr($p_path, '\\', '/');
}
}
return $p_path;
}
// --------------------------------------------------------------------------------
?>
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Docs for page pclzip.lib.php
/administrator/includes/pcl/pclzip.lib.php. Description ...
www.mambolearn.com - PHPXRef 0.7 : WordPress : Detail view of class-pclzip.php
privDisableMagicQuotes() privSwapBackMagicQuotes() PclZipUtilPathReduction () PclZipUtilPathInclusion() PclZipUtilCopyBlock() PclZipUtilRename() ...
phpxref.ftwr.co.uk - Docs for page class-pclzip.php
/wp-admin/includes/class-pclzip.php. Description. Description ...
phpdoc.wordpress.org - Docs for page pclzip.lib.php - b2evolution technical documentation
Mar 6, 2010 ... void PclZipUtilPathReduction( $p_dir ). Parameters: $p_dir: [ Top ]. PclZipUtilRename [line 5616]. void PclZipUtilRename( $p_src, $p_dest ) ...
doc.b2evo.net