Jump to content

Argonust

New Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Argonust

  • Rank
    Newbie
  1. Thank's requinix Sorry but it is print_r($images); shows all the images, that's why I posted the problem here Would'nt I get errors if I was calling the method incorrectley?
  2. Hi I have a script for displaying images see below <?php include "header.php"; require 'gallery/Gallery.php'; ?> <?php $models=file("models.txt", FILE_USE_INCLUDE_PATH); if(isset($_POST['model'])){ $model=($_POST['model']); } $gallery = new Gallery(); $gallery->setPath('gallery/images/'.$model); $images = $gallery->getImages(array('jpg')); ?> <div class="container"> <?php if($images): ?> <div class=gallery cf > <?php foreach($images as $image):?> <div class="gallery-item"> <a href="<
  3. Thank you, requinix Installing the GD extention worked Thank you
  4. Hi I have a function $images = $access->getImages(); foreach($files as $file) { $save = 'thumbs/'.$file; create_thumbs($file, "$save" ,150,150); } Here is what it calls function create_thumbs($path,$save,$height,$width){ $info=getimagesize($path); //print_r($info); $size=array($info[0], $info[1]); if($info['mime'] == 'image/jpeg'){ $src=imagecreatefromjpeg($path); }else{ return false; } This code works for me in OpenSuse, however when I move the file to my web server that is CentOS 7 it does not work I get : Fatal erro
  5. Thanks phpmillion Unfortunetley, your recommendation did not work
  6. Hi I am have trouble with making this bit of code work if(!isset($_GET['m'])) { die(); } $model = ($_GET['m']); $images = "thumbs/$model/"; $big = "gallery/$model/"; if($handle=opendir($images)) { while(false!==($file=readdir($handle))) { if($file !=="."&&$file !=".."&&$file !=rtrim($big,"/")) { $files[]=$file; } } closedir($handle); } When I run this code nothing happens. I get this error message PHP Warning: opendir(thumbs/Honda/): failed to open dir: Permission denied in /var/www/html/Cars/index.php on line 56, referer: http://localhos
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.