Welcome Guest, Not a member yet? Register   Sign In
My Request helper or library
#7

[eluser]Ngulo[/eluser]
thank you slowgary

Code:
<?php  
if ( ! defined('BASEPATH')) exit('No direct script access allowed');


class CI_Request extends Controller {

    public function is_ajax() {


        return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest';
    }

    public function is_post(){

        return isset($_POST);
    }

    public function is_get(){

        return isset($_GET);
    }
    
}

?>
in my controller i declare like this:
Code:
$this->load->library('request');
                
                if($this->request->is_get())
                {
                    echo 'yes is get';
                }
                else{echo 'is not get';}
but it's still not working again Sad

did you find some other errors please ? Sad

really really thanks Wink


Messages In This Thread
My Request helper or library - by El Forum - 09-05-2010, 06:33 AM
My Request helper or library - by El Forum - 09-05-2010, 09:27 AM
My Request helper or library - by El Forum - 09-05-2010, 09:43 AM
My Request helper or library - by El Forum - 09-05-2010, 09:54 AM
My Request helper or library - by El Forum - 09-05-2010, 09:57 AM
My Request helper or library - by El Forum - 09-05-2010, 10:23 AM
My Request helper or library - by El Forum - 09-05-2010, 12:43 PM
My Request helper or library - by El Forum - 09-05-2010, 02:38 PM
My Request helper or library - by El Forum - 09-06-2010, 12:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB