Ativar método GET


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.