mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-03 22:01:36 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			72 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			72 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
<?xml version="1.0" encoding="iso-8859-1"?>
 | 
						|
<!-- $Revision$ -->
 | 
						|
     <sect1 id="variable.use.sub.dirs">
 | 
						|
      <title>$use_sub_dirs</title>
 | 
						|
 <para>
 | 
						|
Smarty will create subdirectories under the
 | 
						|
<link linkend="variable.compile.dir">compiled templates</link> and
 | 
						|
<link linkend="variable.cache.dir">cache</link>
 | 
						|
directories if <parameter>$use_sub_dirs</parameter> is set to &true;,
 | 
						|
 default is &false;.
 | 
						|
In an environment where there are potentially tens of thousands of files created,
 | 
						|
this may help the filesystem speed.
 | 
						|
On the other hand, some environments do not allow PHP processes to
 | 
						|
create directories, so this must be disabled which is the default.
 | 
						|
</para>
 | 
						|
<para>
 | 
						|
Sub directories are more efficient, so use them  if you can.
 | 
						|
Theoretically you get much better perfomance on a filesystem with 10
 | 
						|
directories each having 100 files, than with 1 directory having 1000
 | 
						|
files. This was certainly the case with Solaris 7 (UFS)... with newer
 | 
						|
filesystems such as ext3 and especially reiserfs, the difference is almost
 | 
						|
nothing.
 | 
						|
</para>
 | 
						|
 | 
						|
<note>
 | 
						|
<title>Technical Note</title>
 | 
						|
<itemizedlist>
 | 
						|
<listitem>
 | 
						|
	<para><literal>$use_sub_dirs=true</literal> doesn't work with
 | 
						|
	<ulink url="&url.php-manual;features.safe-mode">safe_mode=On</ulink>,
 | 
						|
	that's why it's switchable and why it's off by default.
 | 
						|
	</para>
 | 
						|
</listitem>
 | 
						|
<listitem>
 | 
						|
	<para><literal>$use_sub_dirs=true</literal> on Windows can cause problems.</para>
 | 
						|
</listitem>
 | 
						|
<listitem>
 | 
						|
	<para>Safe_mode is being deprecated in PHP6.</para>
 | 
						|
</listitem>
 | 
						|
</itemizedlist>
 | 
						|
</note>
 | 
						|
 | 
						|
 <para>
 | 
						|
  See also
 | 
						|
  <link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>,
 | 
						|
  <link linkend="variable.cache.dir"><parameter>$cache_dir</parameter></link>,
 | 
						|
   and
 | 
						|
   <link linkend="variable.compile.dir"><parameter>$compile_dir</parameter></link>.
 | 
						|
 </para>
 | 
						|
</sect1>
 | 
						|
<!-- Keep this comment at the end of the file
 | 
						|
Local variables:
 | 
						|
mode: sgml
 | 
						|
sgml-omittag:t
 | 
						|
sgml-shorttag:t
 | 
						|
sgml-minimize-attributes:nil
 | 
						|
sgml-always-quote-attributes:t
 | 
						|
sgml-indent-step:1
 | 
						|
sgml-indent-data:t
 | 
						|
indent-tabs-mode:nil
 | 
						|
sgml-parent-document:nil
 | 
						|
sgml-default-dtd-file:"../../../../manual.ced"
 | 
						|
sgml-exposed-tags:nil
 | 
						|
sgml-local-catalogs:nil
 | 
						|
sgml-local-ecat-files:nil
 | 
						|
End:
 | 
						|
vim600: syn=xml fen fdm=syntax fdl=2 si
 | 
						|
vim: et tw=78 syn=sgml
 | 
						|
vi: ts=1 sw=1
 | 
						|
-->
 | 
						|
 |