php - routes in codeigniter/pyrocms -


i saw route downloaded sample module @ pyrocms

$route['sample(/:num)?'] = 'sample/index$1'; 

i tried removed '$1' above , site runs smooth. wondering what's for, , can remove it.

$1 whatever matched (:num) group - is, really, valid numbers. whatever add passed parameter view method in pages controller. example

$route['sample(/:num)?'] = 'sample/index/$1'; 

now in sample controller

function index($id){    // $id matched group (:num) } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -