![]() |
Add ending slash
function add_ending_slash($path){
$slash_type = (strpos($path, '\\')===0) ? 'win' : 'unix'; $last_char = substr($path, strlen($path)-1, 1); if ($last_char != '/' and $last_char != '\\') { // no slash: $path .= ($slash_type == 'win') ? '\\' : '/'; } return $path; } |
PHP Code:
|
Quote:
|
| All times are GMT +1. The time now is 10:51 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.