Jump to content
php.lv forumi

ID parametru mainīgā nodošana


nuubers

Recommended Posts

karo4:

 

function ListFiles($dir) {

   if($dh = opendir($dir)) {

       $files = Array();
       $inner_files = Array();

       while($file = readdir($dh)) {
           if($file != "." && $file != ".." && $file[0] != '.') {
               if(is_dir($dir . "/" . $file)) {
                   $inner_files = $this->ListFiles($dir . "/" . $file);
                   if(is_array($inner_files)) $files = array_merge($files, $inner_files); 

               } else {
                   array_push($files, $dir . "/" . $file);
               }
           }
       }

       closedir($dh);
       return $files;
   }
}

 

function get{
   foreach ($this->ListFiles('.') as $key=>$file){

info no faila preview skatā ar linku uz faila..

      }
}

function open(){
foreach ($this->ListFiles('.') as $key=>$file){

info detail pec linka..

 

  }
}

 

kaa padot ID lai atverās tikai attiecigais raksts

Edited by nuubers
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...