php function wont work (2 posts)

  1. gvestudios
    Posted 7 years ago #

    i am drying to use my own php script to input my images from my gallery directory and keep getting this error message:

    Warning: opendir(http://localhost/gvestudios/wp-content/uploads/) [function.opendir]: failed to open dir: not implemented in D:\Sites\gvestudios\wp-content\themes\robinson\art.php on line 20
    There are no images in this gallery.

    here is my code"`

    $image_dir = 'http://localhost/gvestudios/wp-content/uploads/';
    $per_column = 6;

    /* step one: read directory, make array of files */
    if ($handle = opendir($image_dir)) {
    while (false !== ($file = readdir($handle)))
    if ($file != '.' && $file != '..')
    $files[] = $file;

    /* step two: loop through, format gallery */
    foreach($files as $file)
    echo '<img src="',$image_dir,$file,'" width="100" height="100" />';
    if($count % $per_column == 0) { echo '<div class="clear"></div>'; }
    echo '<p>There are no images in this gallery.</p>';


    this works fine on ally other sites but not in wordpress....any help is appreciated

  2. galleryuccs
    Posted 6 years ago #

    I also have a big php problem:

    I'm getting errors on post pages, saying that if I save them the php will be rendered permanently unusable.

    Now the right post content can't be found for the pages, and neither can the images!

    Please help, I'm the new admin on the galleryuccs.org site.
    Any help would be greatly appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic