|
<?php
/**
* 关于ci的使用
* 本人只写了些认为比较常用的URL处理函数和关键字,希望能给大家带来帮助!!
*/
//http://localhost/wbf/cikj/index.php/test/demo(完整的URL)
class Test extends CI_Controller{
function demo(){
$this->load->helper('url');
echo site_url().'<br>';//http://localhost/wbf/cikj/index.php
echo base_url().'<br>';//http://localhost/wbf/cikj/
echo current_url().'<br>';//http://localhost/wbf/cikj/index.php/test/demo
echo index_page().'<br>';//index.php
echo uri_string();//test/demo
}
function constans(){
echo EXT.'<br>';//.php
echo FCPATH.'<br>';//F:\web\wbf\cikj\
echo SELF.'<br>';//index.php
echo BASEPATH.'<br>';//F:/web/wbf/cikj/system/
echo APPPATH.'<br>';//application/
echo CI_VERSION.'<br>';//2.0.2
echo FILE_READ_MODE.'<br>';//420
echo FILE_WRITE_MODE.'<br>';//438
echo DIR_READ_MODE.'<br>';//493
echo DIR_WRITE_MODE.'<br>';//511
echo FOPEN_READ.'<br>';//rb
echo FOPEN_READ_WRITE.'<br>';//r+b
echo FOPEN_READ_WRITE_CREATE.'<br>';//a+b
echo FOPEN_WRITE_CREATE_DESTRUCTIVE.'<br>';//wb
echo FOPEN_READ_WRITE_CREATE_DESTRUCTIVE.'<br>';//w+b
}
}
|
|