php - opendir() failed to open dir, not impemented in

563

I'm trying to write some php to make an image slideshow from a file on a server. When I try to opendir it gives me the error in the title

$images = glob('*.{jpg,jpeg,png,gif}', GLOB_BRACE);
$count = count($images);
$var_count = $count + 1;

$arr_img = Array();
$handle = opendir('http://dev2.matrix.msu.edu/~matrix.training/Holmberg_Dane');
while (false !== ($file = readdir($handle))) {
 if ($file != "." && $file != "..") {
    $arr_img[] = $file;
 }
}
828

Answer

Solution:

You can't callopendir() on an HTTP address. HTTP doesn't have the concept of "directories" (unless you count WebDAV).

People are also looking for solutions to the problem: php - Fat Free: Unable to load dynamic library 'imagick.so'

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.