Guest User

Untitled

a guest
Oct 15th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: lapushkov
  5. * Date: 15/10/2018
  6. * Time: 23:12
  7. */
  8.  
  9. class ImageOptimization
  10. {
  11. /*Получаем все изображения*/
  12. public function allImages()
  13. {
  14. $this->getList();
  15. }
  16.  
  17. /*Получаем список изображений указывая начальный путь поиска*/
  18. private function getList($rootPath = "/")
  19. {
  20. $path = $_SERVER["DOCUMENT_ROOT"] . $rootPath;
  21. $dirList = $this->directories($path);
  22. print_r($dirList);
  23. }
  24.  
  25. /*Возвращает список директорий*/
  26. //TODO заставить выдавать список директорий, лол
  27. private function directories($path)
  28. {
  29. return scandir($path);
  30. }
  31. }
Add Comment
Please, Sign In to add comment