0

私はいくつかのコードを持っています:

<div id="image-cycle-container">
<ul id="image-cycle">
<?php 
    //Select the folder which the images are contained within and store as an array
    $imgDir = get_stylesheet_directory_uri() . '/img/image-cycle/'; 
    $images = glob($imgDir . '*.jpg');
    foreach($images as $image){
        echo 'something';
        echo "<li><img src='".$image."' /></li>\n";
    }    
?>
</ul>

問題は、画像が表示されないことです (確かに存在しますが)。私はそれらを絶対に参照できますが、PHPは何も見つけられません/配列は空です。私はサイトの開発に WAMP を使用していますが、これが私の人生の悩みの種ではないかと考え始めています...

4

1 に答える 1