We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use Aura\Router\RouterContainer; /** * Database Connector * * @link https://www.watermelon.lucychats.com/docs for Programming Tutorials * @author lucychats <[email protected]> */ include __DIR__ . '/autoload.php'; $routerContainer = new RouterContainer(); $map = $routerContainer->getMap(); $map->get('blog.read', '/index/{id}', function ($request) { $id = (int) $request->getAttribute('id'); $response = new \Zend\Diactoros\Response(); $response->getBody()->write("You asked for blog entry {$id}."); echo $response; });
I have the code on my index.php page with .htaccess
RewriteEngine on Options All -Indexes RewriteRule ^$ index.php [QSA] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] RewriteRule ^ %1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*?)/?$ $1.php [NC,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html [NC,L]
I tried outputing the id arugument of the route but nothing is showing...
Am a newbie in working with route please give me more explanations on how to do this... Thanks.
The text was updated successfully, but these errors were encountered:
I am not using apache. I am using nginx. But anything that most of the php projects follow should work. FYI you can look at the docs from Symfony regarding the server configuration for the current time. https://symfony.com/doc/current/setup/web_server_configuration.html#apache-with-php-fpm
Sorry, something went wrong.
No branches or pull requests
I have the code on my index.php page with .htaccess
I tried outputing the id arugument of the route but nothing is showing...
Am a newbie in working with route please give me more explanations on how to do this... Thanks.
The text was updated successfully, but these errors were encountered: