Trim + and space from end of file

Not something that should/could be used consistently across enviro's so
am trimming these chars off
This commit is contained in:
Matt Pass
2013-05-10 17:41:37 +01:00
parent 0947172391
commit 5f0ee6d95e

View File

@@ -10,6 +10,9 @@ $file = str_replace("|","/",strClean(
: $_GET['file']
));
// Trim any +'s or spaces from the end of file
$file = rtrim(rtrim($file,'+'),' ');
// Make $file a full path and establish the $fileLoc and $fileName
if (strpos($file,$docRoot)===false) {$file=str_replace("|","/",$docRoot.$iceRoot.$file);};
$fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/"));