Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member max2598's Avatar
    Join Date
    Oct 2015
    Location
    Patiala, Punjab, India
    Posts
    21
    Member #
    52192
    Liked
    1 times

    Help me to correct this script.

    Hi i got this php image gallery script but don't know how to set it's path etc, plss help i have attached screen shot of my ftp control pannel & all the images are located in (gallery-images) folder.

    whole gallery is attached in zip folder


    Here is the coding in red colour


    gallery.zipgallery.zip

    <?php
    $dir = dirname(__FILE__) .'/gallery-images';
    $pics = preg_grep('/^([^.])/', scandir($dir));
    foreach ($pics as $pic) {
    if($pic == "." || $pic == ".." || $pic == 'tmp') {

    }
    else {
    if(!file_exists(realpath($_SERVER["DOCUMENT_ROOT"]).'/gallery-images/tmp/'.$pic)) {
    $thumb = new Imagick();
    $thumb->readImage(realpath($_SERVER["DOCUMENT_ROOT"]).'/gallery-images/'.$pic);
    $thumb->cropThumbnailImage(160,160);
    $thumb->writeImage(realpath($_SERVER["DOCUMENT_ROOT"]).'/gallery-images/tmp/'.$pic);
    }
    echo '<a href="/gallery-images/'. $pic .'"><img class="thumb" src="/gallery-images/tmp/'. $pic .'"></a>';
    }
    }
    ?>
    Attached Images Attached Images

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 10:00 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com