Utworzyłem sobie taką regułę.
Kod
routes.video.route = video/:id
routes.video.defaults.controller = video
routes.video.defaults.action = view
routes.video.reqs.id = \w+
routes.video.defaults.controller = video
routes.video.defaults.action = view
routes.video.reqs.id = \w+
I za ID chciałbym podawać dowolnego stringa, który może zawierać myślnik, np. "p-K3uj3nSTM". Obecnie to działa tylko dla argumentów niezawierających myślnika, np. VrBm87BnZb4. Problemem jest tylko ten myślnik.
Gdy jest myślnik wyświetla wtedy taki błąd:
Kod
Wiadomość: Action "pK3uj3nstm" does not exist and was not trapped in __call()
Trasa stosu:
#0 /home/admin/mmoscribe/library/Zend/Controller/Action.php(515): Zend_Controller_Action->__call('pK3uj3nstmActio...', Array)
#1 /home/admin/mmoscribe/library/Zend/Controller/Dispatcher/Standard.php(289): Zend_Controller_Action->dispatch('pK3uj3nstmActio...')
#2 /home/admin/mmoscribe/library/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#3 /home/admin/mmoscribe/public/index.php(36): Zend_Controller_Front->dispatch()
#4 {main}
Żądane parametry:
array(3) {
["controller"]=>
string(5) "video"
["action"]=>
string(11) "p-K3uj3nSTM"
["module"]=>
string(7) "default"
}
Trasa stosu:
#0 /home/admin/mmoscribe/library/Zend/Controller/Action.php(515): Zend_Controller_Action->__call('pK3uj3nstmActio...', Array)
#1 /home/admin/mmoscribe/library/Zend/Controller/Dispatcher/Standard.php(289): Zend_Controller_Action->dispatch('pK3uj3nstmActio...')
#2 /home/admin/mmoscribe/library/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#3 /home/admin/mmoscribe/public/index.php(36): Zend_Controller_Front->dispatch()
#4 {main}
Żądane parametry:
array(3) {
["controller"]=>
string(5) "video"
["action"]=>
string(11) "p-K3uj3nSTM"
["module"]=>
string(7) "default"
}
Proszę o pomoc.
Z góry dziękuję.