php - Blank page diagnose. IF problems -


what i'm trying add elevatezoom gallery , create little squares based on result mysql(if photo1 set location square1 appears , if photo2 set location , square 2 appears , if photo3 empty , nothing appears(you idea)

the problem , after next edits , i'm getting blank page.

this whole code .

    <?php use_helper("staticurl");?> <div class="product_image">     <?php        $href = url_for($product->getrouteurl(esc_raw));       if ($sf_context->getactionname() == 'view')     {       $href = static_url_for($product->generatephotopath('large',esc_raw));     }     ?>    <a <?php echo $sf_context->getactionname() == 'view' ? 'class="lightbox"' : ''; ?> href="<?php echo $href;?>" title="<?php echo $product; ?>">         <img src="<?php echo  static_url_for($product->generatephotopath(esc_raw)); ?>" alt="<?php echo $product; ?>" data-zoom-image="<?php echo  static_url_for($product->generatephotopath('large',esc_raw)); ?>" class="zoom" style="z-index:999999;" />   </a>    <?php     $resultt  = doctrine_query::create()->from("product")                           ->select("photo1")                           ->where("id = ?", $product_id)                           ->fetchone(array(), doctrine_core::hydrate_array);     if (empty($resultt))     {        return sfview::none;     }    ?>      <?php if(isset(resultt)){  ?>   <div id="gal1">    <a href="#" data-image="<?php echo  url_for($product->generatephotopath("small", 1, esc_raw)); ?>" data-zoom-image="<?php echo  url_for($product->generatephotopath("large", 1, esc_raw)); ?>">     <img id="img_01" src="<?php echo  url_for($product->generatephotopath("small", 1, esc_raw)); ?>" />   </a>      <?php } ?>    <a href="#" data-image="<?php echo  url_for($product->generatephotopath("small", 2, esc_raw)); ?>" data-zoom-image="<?php echo  url_for($product->generatephotopath("large", 2, esc_raw)); ?>">     <img id="img_01" src="<?php echo  url_for($product->generatephotopath("small", 2, esc_raw)); ?>" />   </a>    <a href="#" data-image="<?php echo  url_for($product->generatephotopath("small", 3, esc_raw)); ?>" data-zoom-image="<?php echo  url_for($product->generatephotopath("small", 3, esc_raw)); ?>">     <img id="img_01" src="<?php echo  url_for($product->generatephotopath("small", 3, esc_raw)); ?>" />   </a>  </div> </div>  <script src="/js/elevatezoom/jquery.elevatezoom.js" type="text/javascript"></script> 

you have error on line 27 of posted reads:

if(isset(resultt)){ 

the error is:

fatal error: cannot use isset() on result of expression (you can use "null !== expression" instead) 

when trying find errors helps turn on errors things show up. use

error_reporting (e_all); 

at top of script while developing.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -