tp框架提供了常量:
/shop/index.php/分組/
控制器/
操作方法/名稱
1/值/名稱
2/值__module__: 路由位址分組資訊
(/shop/index.php/分組)
__controller__: 路由位址控制器資訊
(/shop/index.php/分組
/控制器)
__action__:路由位址操作方法資訊
(/shop/index.php/分組
/控制器
/操作方法
__self__: 路由位址的全部資訊(/shop/index.php/分組
/控制器
/操作方法/名稱
1/值/名稱
2/值)
module_name: 分組名稱
controller_name:控制器名稱
action_name: 操作方法名稱
/index.php/admin/order/showlist
__controller__:/index.php/admin/order
__module__ :/index.php/admin
__action__ :/index.php/admin/order/showlist
/index.php/admin/goods/detail
__controller__:/index.php/admin/goods
__module__ :/index.php/admin
__action__ :/index.php/admin/goods/detail
以上表示,不同路由位址對應的常量要發生變化。
常量資訊的表現:
獲得當前ViewController
easy ti get your current view controller in display 使你的view controller 繼承自 baseviewcontroller make your viewcontroller inheritance baseviewcontroller ...
C 獲得當前時間
獲取日期 時間 datetime.now.tostring 2008 9 4 20 02 10 datetime.now.tolocaltime tostring 2008 9 4 20 12 12 獲取日期 datetime.now.tolongdatestring tostring 2008年9...
獲得當前系統時間
1.首先包括標頭檔案 2.然後 time t rtime 用time t表示的時間 日曆時間 是從乙個時間點 例如 1970年1月1日0時0分0秒 到此時的秒數。在time.h中,我們也可以看到time t是乙個長整型數。3.struct tm timeinfo time rtime timeinf...