Posted By

joaobarbosa on 10/31/10


Tagged

codeigniter


Versions (?)

Ativar método GET


 / Published in: PHP
 

Basta mudar a linha correspondente no arquivo de configuração do CI

  1. # NO ARQUIVO CONFIG.PHP
  2.  
  3. $config['uri_protocol'] = "PATH_INFO";
  4.  
  5. # EXEMPLO NO CONTROLLER
  6.  
  7. class Welcome extends Controller {
  8.  
  9. function Welcome()
  10. {
  11. parent::Controller();
  12. }
  13.  
  14. function index()
  15. {
  16. parse_str($_SERVER['QUERY_STRING'],$_GET); //converts query string into global GET array variable
  17. print_r($_GET); //test the $_GET variables
  18. $this->load->view('welcome_message');
  19. }
  20. }

Report this snippet  

You need to login to post a comment.