Files
smarty/docs/en/programmers/api-variables/variable-use-sub-dirs.xml

72 lines
2.2 KiB
XML
Raw Normal View History

2004-04-13 11:47:32 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="variable.use.sub.dirs">
<title>$use_sub_dirs</title>
2005-05-27 16:25:02 +00:00
<para>
Smarty will create subdirectories under the
2006-09-27 06:28:21 +00:00
<link linkend="variable.compile.dir">compiled templates</link> and
2005-05-27 16:25:02 +00:00
<link linkend="variable.cache.dir">cache</link>
2006-09-27 06:28:21 +00:00
directories if <parameter>$use_sub_dirs</parameter> is set to &true;,
default is &false;.
2005-05-27 16:25:02 +00:00
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
2006-09-27 06:28:21 +00:00
create directories, so this must be disabled which is the default.
2005-05-27 16:25:02 +00:00
</para>
<para>
2006-09-27 06:28:21 +00:00
Sub directories are more efficient, so use them if you can.
2005-05-27 16:25:02 +00:00
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>
2006-09-27 06:28:21 +00:00
2005-05-27 16:25:02 +00:00
<note>
<title>Technical Note</title>
2006-09-27 06:28:21 +00:00
<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>
2005-05-27 16:25:02 +00:00
</note>
2006-09-27 06:28:21 +00:00
<para>
2005-05-27 16:25:02 +00:00
See also
2006-09-27 06:28:21 +00:00
<link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>,
<link linkend="variable.cache.dir"><parameter>$cache_dir</parameter></link>,
2005-05-27 16:25:02 +00:00
and
2006-09-27 06:28:21 +00:00
<link linkend="variable.compile.dir"><parameter>$compile_dir</parameter></link>.
</para>
2004-04-13 11:47:32 +00:00
</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
2005-05-27 16:25:02 +00:00
-->