mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-04 06:11:37 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			69 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			69 lines
		
	
	
		
			2.1 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">templates_c</link> and
 | 
						|
<link linkend="variable.cache.dir">cache</link>
 | 
						|
directories if $use_sub_dirs 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. The default is false (disabled).
 | 
						|
Sub directories are more efficient, so use them  if you can.
 | 
						|
</para>
 | 
						|
<para>
 | 
						|
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>
 | 
						|
<para>
 | 
						|
$use_sub_dirs=true 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>
 | 
						|
<para>
 | 
						|
$use_sub_dirs=true on Windows can cause problems.
 | 
						|
</para>
 | 
						|
</note>
 | 
						|
      <note>
 | 
						|
      <title>Note</title>
 | 
						|
      <para>
 | 
						|
          Since Smarty-2.6.2 <varname>$use_sub_dirs</varname> defaults to false.
 | 
						|
      </para>
 | 
						|
      </note>
 | 
						|
 <para>
 | 
						|
  See also
 | 
						|
  <link linkend="variable.compile.dir">$compile_dir</link>,
 | 
						|
  <link linkend="variable.compile.id">$compile_id</link>
 | 
						|
   and
 | 
						|
  <link linkend="variable.cache.dir">$cache_dir</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
 | 
						|
-->
 | 
						|
 |