While using the built-in PHP web server, how do you set configuration options, typically set using php.ini or a .htaccess file?
Simply add a custom configuration file to your project, and then run the built-in server with this flag:
php -S localhost:8000 -c php.ini
This is especially helpful for settings that cannot be set at runtime using ini_set().
php.ini file:short_open_tag=On
You can also forgo the php.ini file and add your configuration inline:
php -S localhost:8000 -c "short_open_tag=On" -t public/ server.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With