Advertisement
Guest User

php code

a guest
Nov 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1.     $extensions_array2 = array('txt');
  2.     if(is_dir($dir_path)) {
  3.         $files2 = scandir($dir_path);
  4.         for($i = 0; $i < count($files2); $i++) {
  5.             if($files2[$i] !='.' && $files2[$i] !='..' && $files2[$i] !='.php') {
  6.                 $file2 = pathinfo($files2[$i]);
  7.                 $extension2 = $file2['extension'];
  8.                 if(in_array($extension2, $extensions_array2)) {
  9.                     echo "<a href='f/$files2[$i] 'target='_blank'>
  10.                     <div style='background-image: url(/txtimg.jpg);' title='$files[$i]'></div></a>";
  11.                 }
  12.                
  13.             }
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement