salve a tutti, sto facendo il routing del mio progettto e sto usando altorouter che mi sembra la classe di routing piu semplice da capire, al momento ho solo due pagine, index.php e upload.php, ho creato la pagina di routes.php che poi ho incluso in questo modo:
solo che non funziona, non mi trasforma gli url come dovrebbe, qualcuno mi sa dire dove ho sbagliato?, grazie in anticipocodice:<?php $router = new AltoRouter(); $router->setBasePath('/home/b2bmomo/www/'); /* Setup the URL routing. This is production ready. */ // Main routes that non-customers see $router->map('GET','/', '', 'home'); $router->map( 'GET', '/upload.php', 'uploadexcel'); $match = $router->match(); // call closure or throw 404 status if( $match && is_callable( $match['target'] ) ) { call_user_func_array( $match['target'], $match['params'] ); } else { // no route was matched header( $_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found'); } ?>

Rispondi quotando