<HTML ><HEAD ><TITLE >clear_compiled_tpl()</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Smarty Manual" HREF="index.html"><LINK REL="UP" TITLE="Smarty Class Methods()" HREF="api.functions.html"><LINK REL="PREVIOUS" TITLE="clear_cache()" HREF="api.clear.cache.html"><LINK REL="NEXT" TITLE="clear_config()" HREF="api.clear.config.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Smarty Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="api.clear.cache.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="api.clear.config.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="api.clear.compiled.tpl" ></A >clear_compiled_tpl()</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN5649" ></A >clear_compiled_tpl() -- clears the compiled version of the specified template resource</DIV ><DIV CLASS="refsect1" ><A NAME="AEN5652" ></A ><H2 >Description</H2 >void <B CLASS="methodname" >clear_compiled_tpl</B > ( [string tpl_file [, string compile_id [, int exp_time]]])<BR ></BR ><P > This clears the compiled version of the specified template resource, or all compiled template files if one is not specified. If you pass a <A HREF="variable.compile.id.html" ><TT CLASS="parameter" ><I >$compile_id</I ></TT ></A > only the compiled template for this specific <A HREF="variable.compile.id.html" ><TT CLASS="parameter" ><I >$compile_id</I ></TT ></A > is cleared. If you pass an exp_time, then only compiled templates older than <TT CLASS="parameter" ><I >exp_time</I ></TT > seconds are cleared, by default all compiled templates are cleared regardless of their age. This function is for advanced use only, not normally needed. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN5672" ></A ><P ><B >Example 13-1. clear_compiled_tpl()</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /></span><span style="color: #FF8000">// clear a specific template resource<br /></span><span style="color: #0000BB">$smarty</span><span style="color: #007700">-></span><span style="color: #0000BB">clear_compiled_tpl</span><span style="color: #007700">(</span><span style="color: #DD0000">'index.tpl'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// clear entire compile directory<br /></span><span style="color: #0000BB">$smarty</span><span style="color: #007700">-></span><span style="color: #0000BB">clear_compiled_tpl</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span> </span> </code></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ><P >See also <A HREF="api.clear.cache.html" ><TT CLASS="varname" >clear_cache()</TT ></A >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="api.clear.cache.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="api.clear.config.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >clear_cache()</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="api.functions.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >clear_config()</TD ></TR ></TABLE ></DIV ></BODY ></HTML >