Get Smarty

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Check reviews of PHP Web Hosting, compatible with Smarty Templates

$use_sub_dirs

$use_sub_dirsTRUE に設定すると、 Smarty は テンプレートディレクトリキャッシュディレクトリ の下にサブディレクトリを作ります。デフォルトは FALSE です。 何万ものファイルが生成される可能性のある環境では、 ファイルシステムの速度低下を抑える助けになります。 一方、環境次第では、ディレクトリを生成するためのPHPプロセスが許容されない事があるので、 その場合はこの変数を無効にしなければなりません。デフォルトは無効になっています。

サブディレクトリは効率がよいので、可能なら使用するとよいでしょう。 理論的には、10のディレクトリがそれぞれ100のファイルを持っているほうが、1つのディレクトリに1000 のファイルを持っている場合よりも良いパフォーマンスを得られます。 少なくとも Solaris 7 (UFS) の場合には確実にそうでした……。 ext3 や reiserfs などの最近のファイルシステムでも、そんなに違いはないでしょう。

テクニカルノート

  • $use_sub_dirs=true は、 safe_mode=On の場合は動作しません。safe_mode は切り替え可能で、デフォルトは off です。

  • $use_sub_dirs=true は、Windows ではうまく動作しません。

  • Safe_mode は、PHP6 で廃止される予定です。

$compile_id$cache_dir および $compile_dir も参照してください。

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 13 plus 8? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
email marketing @ActiveCampaign
broadband deals @BroadbandGenie
Best UK Web Hosting @webhost.uk.net
Reliable UK and US Web Hosting @rshosting.com
Cheap US and UK Web Hosting @infrenion.com
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Speed Test @broadbandspeed.co.uk
bulk email software @americaint.com
ASP.NET hosting @aspnethosting.co.uk