Get Smarty

Donate

Donate Bitcoin Bitcoin
Paypal

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:

Sites Using Smarty

Buy cheap eyeglasses from Cheapglasses123.com and save up to 80%.

Buy prescription glasses from www.australiaglasses.com and save.

Cheap Glasses Now On Sale at GlassesPeople.com. Starts At $7.95.

Where to buy discount wedding dresses and cheap smart dresses free shipping - Weddingdresstrend.com

Brautkleider auf Topwedding.de

Find free files to download on allwhatyouwant.net

Looking For Affordable Wedding Dresses 2015 at Best Prices On TDBridal.com

Shop high quality cheap prom dresses on Dresswe.co.uk

Buy New Arrival Cheap Prom Dresses 2015 at JDBRIDAL Prom Dress Store

Advertisement

{fetch}

{fetch}鐢ㄤ簬鑾峰彇鏂囦欢鍐呭銆丠TTP鎴栬匜TP鍐呭锛屼互渚胯緭鍑恒

  • 濡傛灉鎻愪緵鐨勬枃浠跺悕鏄互http://寮澶达紝閭d箞缃戠珯鐨勫唴瀹瑰皢琚幏鍙栧苟鏄剧ず銆

    Note

    璇ュ嚱鏁颁笉鏀寔鐩存帴鐨凥TTP璁块棶锛岃纭缃戦〉鐨勫湴鍧鏄互鏂滄潬缁撳熬銆

  • 濡傛灉鏂囦欢鍚嶆槸浠ftp://寮澶达紝閭d箞鏂囦欢浼氳浠嶧TP涓笅杞藉苟鏄剧ず銆

  • 鏈湴鏂囦欢鑰岃█锛屽彲浠ヤ娇鐢ㄧ粷瀵硅矾寰勭殑鏂囦欢锛屾垨鑰呯浉瀵逛簬褰撳墠鎵ц鐨凱HP鑴氭湰鐨勮矾寰勬枃浠跺潎鍙

    Note

    濡傛灉寮鍚簡瀹夊叏鏈哄埗锛岄偅涔堜粠鏈湴鑾峰彇鏂囦欢鍐呭锛{fetch}鍑芥暟浠呰兘璇诲彇鍦 $secure_dir瀹夊叏鐩綍涓嬬殑鏂囦欢銆 鍙傝瀹夊叏鏈哄埗

  • 濡傛灉浣犳彁渚涗簡assign 灞炴э紝 {fetch}鍑芥暟鐨勮緭鍑哄皢涓嶄細鏄剧ず锛岃屾槸璧嬪肩粰妯℃澘鍙橀噺銆

鍙傛暟鍚嶇О 绫诲瀷 蹇呴夊弬鏁 榛樿鍊 璇存槑
file string Yes n/a 鑾峰彇鐨勬枃浠跺悕銆丠TTP鎴栬匜TP缃戝潃
assign string No n/a 鐢ㄤ簬璧嬪肩殑鍙橀噺鍚

Example聽8.5.聽{fetch} 渚嬪瓙


{* include some javascript in your template *}
{fetch file='/export/httpd/www.example.com/docs/navbar.js'}

{* embed some weather text in your template from another web site *}
{fetch file='http://www.myweather.com/68502/'}

{* fetch a news headline file via ftp *}
{fetch file='ftp://user:password@ftp.example.com/path/to/currentheadlines.txt'}
{* as above but with variables *}
{fetch file="ftp://`$user`:`$password`@`$server`/`$path`"}

{* assign the fetched contents to a template variable *}
{fetch file='http://www.myweather.com/68502/' assign='weather'}
{if $weather ne ''}
  <div id="weather">{$weather}</div>
{/if}

  

鍙傝 {capture}, {eval}, {assign}fetch().

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 8 plus 1? (Are you human?)

Advertisement