note 38673 added to class.dir
| From: | jukkissh at hotmail dot com | Date: | Fri, 02 Jan 2004 14:37:20 +0000 |
| Subject: | note 38673 added to class.dir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62782@lists.php.net to get a copy of this message | ||
If you are worried about trailing slashes etc try these functions:
function add_trailing ($strString, $strTrailchar) {
if (substr($strString, -1) != $strTrailchar) {
$strString .= $strTrailchar;
}
return ($strString);
} // add_trailing
function drop_trailing ($strString, $strTrail) {
if (substr($strString, -1) == $strTrailchar) {
$strString = substr($strString, 0, -1);
}
return ($strString);
} // drop_trailing
You can use them always, they always add/drop the specified trailing str if necessary.
----
Manual Page -- http://www.php.net/manual/en/class.dir.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38673
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38673&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38673&report=yes
Search -- http://master.php.net/manage/user-notes.php