Diff for phpPlatonLib/common/misc/Attic/fnc.dir_back.php between version 1.2 and 1.3
| version 1.2, 2002/04/20 14:57:49 |
version 1.3, 2002/04/21 23:21:19 |
|
|
| <?php |
<?php |
| |
|
| require_once dirname(__FILE__) . '/../str/fnc.append_slash.php'; |
/* |
| |
* phpPlatonLib - Platon software development group PHP library |
| |
* |
| |
* common/misc/fnc.dir_back.php - create back directory of $dir |
| |
* ____________________________________________________________ |
| |
* |
| |
* Developed by Ondrej Jombik <nepto@pobox.sk> |
| |
* Copyright (c) 2001-2002 Platon SDG, http://www.platon.sk/ |
| |
* All rights reserved. |
| |
* |
| |
* See README file for more information about this software. |
| |
* See COPYING file for license information. |
| |
* |
| |
* Download the latest version from |
| |
* http://www.platon.sk/projects/phpPlatonLib/ |
| |
*/ |
| |
|
| |
/* $Id$ */ |
| |
|
| |
if (! defined('phpPlatonLib_fnc_dir_back')) { |
| |
define('phpPlatonLib_fnc_dir_back', 1); |
| |
|
| |
require_once dirname(__FILE__) . '/../str/fnc.append_slash.php'; |
| |
|
| |
function dir_back($dir) |
| |
{ |
| |
$dir_back = ''; |
| |
|
| function dir_back($dir) |
$i = substr_count(append_slash($dir), '/'); |
| { |
|
| $dir_back = ''; |
|
| |
|
| $i = substr_count(append_slash($dir), '/'); |
for (; $i > 0; $i--) |
| |
$dir_back .= '../'; |
| |
|
| for (; $i > 0; $i--) |
return $dir_back; |
| $dir_back .= '../'; |
} |
| |
|
| return $dir_back; |
|
| } |
} |
| |
|
| ?> |
?> |
Platon Group <platon@platon.org> http://platon.org/
|
|