Jump to content

Hide Resource id #1


mat3000000

Recommended Posts

Here is what is echoing the string "Resource id #1". However I do not know if it is the php or javascript that is outputting this. Can anyone tell me why this is showing and how to make it not show?  :confused:

 

PHP:

$directory = "Images/items/$product/";

//get all image files with a .jpg extension.
$images = glob($directory . "*.jpg");

$imgone = $images[0];



$gallery = '<tr><td valign="top" align="center">';
foreach($images as $image)
{
$tn = explode("/", $image);
$tnname = $tn[3];

$gallery .= '<a href="#" rel="'.$image.'" class="image" alt="Images/items/'.$product.'/large/'.$tnname.'"><img src="Images/items/'.$product.'/thumbs/'.$tnname.'" class="thumb" border="1" style="margin-bottom:7px;"/></a> ';
}


if(is_dir("Images/items/".$product))
$gallery .= "</td></tr><tr><td width='300'>".$link."<div id='image' class='bigimg' align='left'>";

if(is_dir('Images/items/'.$product))
$gallery .= '<img src="'.$imgone.'" border="0"/></div></a></td></tr>';

 

JS (jQuery)

$(function() {
$(".image").click(function() {
var image = $(this).attr("rel");
var large = $(this).attr("alt");
$('#image').hide();
$('#image').fadeIn('slow');
$('#image').html('<a href="' + large + '" ><img src="' + image + '"/></a>');
return false;
    });
});

Link to comment
https://forums.phpfreaks.com/topic/245676-hide-resource-id-1/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.