Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //PER STAMPARE IN RICORSIVO
- //$_SESSION['init_temp_path']="../archistore/_/tmp_file/1/extra_final/"
- //In Questa funzione dovrebbe stampare il link progressivo delle url quello che faccio รจ
- //fare explode stampare al volo le singole directory ma non so come mantenere il valore progressivo delle url annidate
- public function viewscrumb(){
- $c=0;
- $array=explode('/',$_SESSION['init_temp_path']);
- $c++;
- foreach($array as $indice=> $val){
- $_SESSION['prova'][]=$val.'/';
- $out.="<a href='#".$this->opendirscrumb($_SESSION['prova'][$c++])."' class='btn btn-link' style='margin-left:0.5%'>$val</a>";} return $out;
- }
- // opendirscrumb fa che : "../archistore/_/tmp_file/1/extra_final/" leva extra_final/ se gli passo extra_final/
- //tutto qui
- public function opendirscrumb($dir){
- $ndir=(strlen($_SESSION['init_temp_path']))-(strlen($dir));
- return substr($_SESSION['init_temp_path'],-$ndir);
- }
- ?>
Add Comment
Please, Sign In to add comment