- substr: documentation ( source)
- str_replace: documentation ( source)
- strrpos: documentation ( source)
- define: documentation ( source)
<?php
define('BR', "\n");
define('DS', DIRECTORY_SEPARATOR);
$str = 'template/base/files/js\jquery1.11.min.js';
$str = str_replace(array('\\', '/'), DS, $str);
echo $str . BR;
$pos = substr($str, strrpos($str, DS, 0));
echo $pos;