Closed ngangchill closed 9 years ago
or if i use Route::any('welcome/load/{id?}', 'welcome/ok/$1')->where('id', '/[0-9]+/');
it shows : \
A PHP Error was encountered
Severity: Warning
Message: strpos(): Empty needle
Filename: libraries/Route.php
Line Number: 848
Backtrace:
File: C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\sites\test\application\libraries\Route.php Line: 848 Function: strpos
File: C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\sites\test\application\libraries\Route.php Line: 628 Function: make
File: C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\sites\test\application\libraries\Route.php Line: 119 Function: createRoute
File: C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\sites\test\application\routes\Route.php Line: 10 Function: any
File: C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\sites\test\application\core\MY_Router.php Line: 31 Function: include
File: C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\sites\test\index.php Line: 292 Function: require_once
with a 404 error...
Hi! Im from mobile, I'll come back Sunday from vacation, I'll check it then and try to see the error, sorry about the delay.
BUT from memory (can't try any example in this computer, it's not mine) the pattern may be like: Route::pattern('id', '[0-9]+'); without the / slashes (but as I have told... if that doesn't work, I'll check it sunday night or monday morning.
Hi, I have checked and it's as I said, you don't have to use the / slashes. It was my fault that the readme says otherwise. I'm going to change it right now. If it still doesn't work, just tell me.
And about the other error, I have changed a line in the library, now it should work without sending the warning.
thanks...
i will try it now...
thnx. everything is working fine...
Thanks about warning about the issues
Controller: welcome.php public function index() { $this->load->view('welcome_message'); }
Route definition
when i use Route::pattern('id', '/[0-9]+/'); in route it shows 404 error.. or whenever i use ....->where('id', '/[0-9]+/') it shows same 404 error.without ->where('id', '/[0-9]+/') it works fine..