Page not found |
These are the codes:
controllers/register.php Code: <? config/autoload.php Code: $autoload['libraries'] = array('form_validation'); routes.php Code: $route['default_controller'] = "register"; How to fix the output: -------------------------------------------------- http://localhost/CI-202-registration/ load->library(array('form_validation')); $this->load->model(array('Mediatutorialcaptcha')); $this->load->helper(array('form', 'url')); $this->load->database(); */ } function index(){ $data['title'] = 'Join MediaTutorial Mobile'; $sub_data['captcha_return'] =''; $sub_data['cap_img'] = $this ->Mediatutorialcaptcha->make_captcha(); if($this->input->post('submit')) { $this->form_validation->set_rules('username', 'User name', 'trim|required|alpha_dash|min_length[3]|max_length[20]|xss_clean'); $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[3]|max_length[20]|xss_clean'); $this->form_validation->set_rules('email', 'Email', 'trim|required|min_length[3]|max_length[30]|valid_email'); $this->form_validation->set_rules('captcha', 'Captcha', 'required'); if ($this->form_validation->run() == FALSE){ $data['body'] = $this->load->view('_join_form', $sub_data, true); } else{ if($this->Mediatutorialcaptcha->check_captcha()==TRUE){ $username = $this->input->post('username'); $password = $this->input->post('password'); $email = $this->input->post('email'); $check_query = "SELECT * FROM `user_codeigniter` WHERE `username`='$username' OR `email`='$email'"; $query = $this->db->query($check_query); if ($query->num_rows() > 0){ $sub_data['captcha_return'] = 'Maap, username atau email yang anda masukkan telah digunakan pihak lain, silahkan ganti '; $data['body'] = $this->load->view('_join_form', $sub_data, true); } else{ $input_data = array( 'username' => $username, 'password' => $password, 'email' => $email, ); if($this->db->insert('user_codeigniter', $input_data)){ $data['body'] = "join success, silahkan login "; } else $data['body'] = "error on query"; } } else{ $sub_data['captcha_return'] = 'Maap captcha salah '; $data['body'] = $this->load->view('_join_form', $sub_data, true); } } } else{ $data['body'] = $this->load->view('_join_form', $sub_data, true); } $this->load->view('_output_html', $data); } } ?> 404 Page Not Found The page you requested was not found.
" If I looks more intelligence please increase my reputation."
You need to Validate all your PHP code..
I can suggest you to use some PHP IDE just to be sure that you don't have a syntax bug. Second thing is to validate your server PHP support > make simple PHP file with Code: <?php phpinfo(); Best VPS Hosting : Digital Ocean
What's PHP IDE that could works with codeigniter ?
phpinfo.php PHP Version 5.4.22 System Windows NT TOSHIBA-PC 6.1 build 7601 (Windows 7 Enterprise Edition Service Pack 1) i586 Build Date Nov 13 2013 21:14:18 Compiler MSVC9 (Visual C++ 2008) Architecture x86 Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo" Server API Apache 2.0 Handler Virtual Directory Support enabled Configuration File (php.ini) Path C:\Windows Loaded Configuration File C:\xampp\php\php.ini Scan this dir for additional .ini files (none) Additional .ini files parsed (none) PHP API 20100412 PHP Extension 20100525 Zend Extension 220100525 Zend Extension Build API220100525,TS,VC9 PHP Extension Build API20100525,TS,VC9 Debug Build no Thread Safety enabled Zend Signal Handling disabled Zend Memory Manager enabled Zend Multibyte Support provided by mbstring IPv6 Support enabled DTrace Support disabled Registered PHP Streams php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, phar Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls Registered Stream Filters convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.*
" If I looks more intelligence please increase my reputation."
Is it duplicate issue?
I replied to this....Let me know if it works for you. http://forum.codeigniter.com/thread-294-...ml#pid1224
It should be extends CI_Controller
and __construct() What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |