Hello, I'm writing a simple application using ez components (from SVN), I use ezcUrl and I have a problem with it.
My application uses three types of URL : http://domain.com/index.php http://domain.com/index.php/group/id http://domain.com/index.php/group/(page)/p So I wrote this code to recognize which page is called : <?php require_once 'ezc.php'; // autoloads $urlCfg = new ezcUrlConfiguration(); $urlCfg->basedir = '/'; $urlCfg->script = 'index.php'; $urlCfg->unorderedDelimiters = array( '(', ')' ); $urlCfg->addUnorderedParameter( 'page', ezcUrlConfiguration::SINGLE_ARGUMENT ); $urlCfg->addOrderedParameter( 'group' ); $urlCfg->addOrderedParameter( 'id' ); $url = new ezcUrl( $my_url, $urlCfg ); header('Content-Type: text/plain'); $group = $url->getParam( 'group' ); $id = $url->getParam( 'id' ); $page = $url->getParam( 'page' ); var_dump($group); var_dump($id); var_dump($page); ?> I made some test with this code on http://archives-newsgroups.pwet.fr/test_url.php. With http://domain.com/index.php/group/(page)/p in $my_url, I expected $id to be null et $page to be equal to 'p' because it's an unordered parameter, but $id is equal to '(page)'. is it normal ? Cheers -- Damien http://pwet.fr/blog -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
