Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1.     private function fetch()
  2.     {
  3.         $html = &$this->tpl_contents;
  4.         $html = str_replace("<if(", "<?php if(", $html);
  5.         $html = str_replace("<elseif(", "<?php elseif(", $html);
  6.         $html = str_replace("<else>", "<?php else: ?>", $html);
  7.         $html = str_replace(")>", "): ?>", $html);
  8.         $html = str_replace("</if>", "<?php endif; ?>", $html);
  9.        
  10.         extract($this->variables);
  11.        
  12.         ob_start();
  13.         eval(" ?>{$html} ");
  14.         $html = ob_get_contents();
  15.         ob_end_clean();
  16.        
  17.         eval(" \$html = \"".addslashes($html)."\"; ");
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement