| current() | ใช้คืนค่า url ปัจจุบัน ( ต่อจาก index.php ) |
|---|---|
| base() | ใช้คืนค่า site_protocol และ site_domain |
| base ( index_page, protocol ) | ใช้คืนค่า site_protocol และ site_domain |
| site() | ใช้คืนค่า site_protocol, site_domain, index_page และ url_suffix |
| file() | ใช้คืนค่า url ของไฟล์ เพื่อที่จะ download |
| redirect() | ใช้เปลี่ยน page ไปยัง href ที่กำหนด |
method:current ();
return type:string
special:static
content:ใช้คืนค่า url ปัจจุบัน ( ต่อจาก index.php )
example:echo url::current ();
method:base ();
return type:string
special:static
content:ใช้คืนค่า site_protocol และ site_domain
example:echo url::base ();
comment:site_protocol คือ protocol ของ url site_domain คือ domain ของ url โดยค่าต่างๆเหล่านี้จะถูกกำหนดไว้ใน "application/config/config.php"
method:base ( index_page, protocol );
return type:string
special:static
content:ใช้คืนค่า site_protocol และ site_domain
example:echo url::base ( true, "ftp" );
comment:ตัวแปร index_page กำหนด true เพื่อที่จะต้องการให้คืนค่า index.php ด้วย ตัวแปร protocol ใช้กำหนด protocol ที่จะแทนที่ protocol ที่เป็นอยู่จริงของ url
method:site ();
return type:string
special:static
content:ใช้คืนค่า site_protocol, site_domain, index_page และ url_suffix
example:echo url::site ();
comment:site_protocol คือ protocol ของ url site_domain คือ domain ของ url index_page เช่น index.php url_suffix เช่น php โดยค่าต่างๆเหล่านี้จะถูกกำหนดไว้ใน "application/config/config.php"
method:file ( filename, absolute );
return type:string
special:static
content:ใช้คืนค่า url ของไฟล์ เพื่อที่จะ download
example:echo url::file ( "media/document/bamboo.txt" );
comment:ตัวแปร absolute ถ้ากำหนด true จะหมายถึงอ้างอิงแบบ absolute path
method:redirect ( href );
return type:void
special:static
content:ใช้เปลี่ยน page ไปยัง href ที่กำหนด
example:url::redirect ( "control/method" );