Just test the code as below:
代码
$uri = substr(request_uri(), 1, strlen(request_uri()));
$uri_array = array();
if(!($path = drupal_lookup_path('source', $uri))) {
$uri_array = explode('/', $uri);
}
else {
$uri_array = explode('/', $path);
}
var_dump($uri_array);
Have fun!