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

{math}

{math}鍙互璁╂ā鏉胯璁¤呭湪妯℃澘涓繘琛屼竴浜涙暟瀛﹁繍绠椼

  • 浠讳綍鍦ㄦā鏉夸腑鐨勬暟瀛楀彉閲忛兘鍙互杩涜璁$畻锛岃岃绠楃殑缁撴灉浼氭浛浠e師鏉ョ殑鏍囩銆

  • 妯℃澘鍙橀噺鎴栬呴潤鎬佺殑鍊奸兘鍙互浣滀负鍙傛暟杩涜璁$畻銆

  • 鍙互鍏佽鐨勮绠楁湁 +, -, /, *, abs, ceil, cos, exp, floor, log, log10, max, min, pi, pow, rand, round, sin, sqrt, srans 鍜 tan 銆 鍙傝PHP鎵嬪唽锛屼簡瑙math 鍑芥暟銆

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

鎶鏈鏄

鍥犱负浣跨敤浜哖HP鍑芥暟 eval()锛屾墍浠{math}鏄竴涓瘮杈冭楄垂鎬ц兘鐨勬搷浣溿 鍦≒HP涓仛鏁板杩愮畻浼氭洿楂樻晥锛屾墍浠ュ敖鍙兘鍦≒HP杩涜鏁板杩愮畻骞朵笖鎶婄粨鏋 assign()鍒版ā鏉夸腑銆 姣旇緝涓嶅缓璁殑鍋氭硶鏄湪寰幆涓娇鐢{math}鍑芥暟锛屾瘮濡傚湪 {section}寰幆銆

鍙傛暟鍚嶇О 绫诲瀷 蹇呴夊弬鏁 榛樿鍊 璇存槑
equation string Yes n/a 鏁板杩愮畻寮
format string No n/a 缁撴灉鐨勬樉绀烘牸寮(sprintf)
var numeric Yes n/a 杩愮畻鐨勫彉閲忓
assign string No n/a 鐢ㄤ簬璧嬪肩殑鍙橀噺鍚
[var ...] numeric Yes n/a 杩愮畻鐨勫彉閲忓

Example聽8.21.聽{math}

渚嬪瓙 a:


   {* $height=4, $width=5 *}

   {math equation="x + y" x=$height y=$width}

  

杈撳嚭锛


   9

  

渚嬪瓙 b:


   {* $row_height = 10, $row_width = 20, #col_div# = 2, assigned in template *}

   {math equation="height * width / division"
   height=$row_height
   width=$row_width
   division=#col_div#}

  

杈撳嚭锛


   100

  

渚嬪瓙 c:


   {* you can use parenthesis *}

   {math equation="(( x + y ) / z )" x=2 y=10 z=2}

  

杈撳嚭锛


   6

  

渚嬪瓙 d:


   {* you can supply a format parameter in sprintf format *}

   {math equation="x + y" x=4.4444 y=5.0000 format="%.2f"}
   
  

杈撳嚭锛


   9.44

  

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

Advertisement