Forum Moderators: coopster
Here is my code:
<?php if (file_exists( $_SERVER{'DOCUMENT_ROOT'} . "/wp-content/gallery/galleryheader/".echo $gallery->ID."-headerthmb.jpg")){ ?> Should I be setting a variable for the echo statement before I run the if (file_exists) clause?
'DOCUMENT_ROOT' points to the public_html directory in my actual code.
Thanks for any help or suggestions, this is really frustrating
EDIT: Here is the rest of my code for context:
<div id="gallery_<?php echo $gallery->ID ?>" class="gallery"><?php
if (file_exists( $_SERVER{'/home/rigidkit/public_html'} . "/wp-content/gallery/galleryheader/".echo $gallery->ID."-headerthmb.jpg")){ ?>
<div id="gallery_<?php echo $gallery->ID ?>"_header" class="gallery_header">
<a rel="shadowbox[%GALLERY_NAME%]" href="http://rigidkitchen.net/wp-content/gallery/galleryheader/<?php echo $gallery->ID ?>-header.jpg">
<img src="http://rigidkitchen.net/wp-content/gallery/galleryheader/<?php echo $gallery->ID ?>-headerthmb.jpg" title="" alt="" />
</a>
</div>
<?php } else { ?>
<div id="gallery_<?php echo $gallery->ID ?>_header" class="gallery_header">
<!-- No Gallery Header Image Found -->
</div>
<?php }
?>