Welcome Guest, Not a member yet? Register   Sign In
Best option to read files
#1

What is the best option to read images?

Im not sure about, file helper: get_filenames($path)  or maybe directory_map($path).

Using filename I can get the url of the image but it also returns the names of the subdirectories and I do not want this. Using directory_map I can use directory depth.

I dont know what is the best option, I need the most optimal solution. Thanks! Big Grin
Reply
#2

Depends, what exactly are you trying to do?

If you are using CI4, in documentation it says you can tell it to leave out the path, setting second attribute to false (which should be false by default?)
https://codeigniter4.github.io/CodeIgnit..._filenames
Reply
#3

Thanks for answering. I'm using CI3, and I want to show galleries of images, each gallery has a subdirectory, in this there is another subdirectory with thumbnails.
Reply
#4

Cool. I usually use scandir for all my file-list operations - http://php.net/manual/en/function.scandir.php
Reply




Theme © iAndrew 2016 - Forum software by © MyBB