list_files() => error undefined function
-
Hi, I’m trying to get the list of files of my custom theme
/image/
directory. I’m using the WordPress functionlist_files()
and I keep getting the error “undefined function”.
the PHP scandir(), doesn’t work either.
Here is the code I’m using:$dir_path = get_template_directory_uri() . '/images/bkgrds/'; $bkgrds = list_files( $dir_path );
what am I doing wrong?
Does anyone have any alternative working method to get the list of files out of a directory?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘list_files() => error undefined function’ is closed to new replies.