| 379 | | /* ----------------------------------------------------------------- */ |
|---|
| 380 | | /** Remet un chemin en position locale |
|---|
| 381 | | * retire ../ ou / au besoin |
|---|
| 382 | | * @file string chemin du repertoire ou du fichier |
|---|
| 383 | | * @return string chemin du repertoir en position local |
|---|
| 384 | | * @access private |
|---|
| 385 | | */ |
|---|
| 386 | | function dir_local($file) { |
|---|
| 387 | | //recherche la chaine commençant aprés ../ ou / ceci n fois |
|---|
| 388 | | preg_match('`^(/|../)*(.*)`',$file,$res); |
|---|
| 389 | | if ($res) { |
|---|
| 390 | | return $res[2]; |
|---|
| 391 | | } else { |
|---|
| 392 | | return $file; |
|---|
| 393 | | } |
|---|
| 394 | | } |
|---|
| 395 | | |
|---|