Tuesday, March 20, 2012

Link to an RSS feed in HTML (whit CakePHP)

Link to an RSS feed for a Webpage. The Browser should display the RSS Logo in the URL Field or elsewhere if you include this line in the of the HTML:

If you use CackePHP, you can generate this easy whit
echo $this->Html->meta('rss', '/.rss', array('title' => 'Space Pirates News'));
Of course, you want to change the URL and the Title ;-)

Tuesday, March 13, 2012

Show all errors in PHP applications

During developing whit PHP, I often run in to just empty page whit out any hint what was going wrong. Using Apache and have set the options "AllowOverride Options" or "AllowOverride All" in the Apache config (done usually by default) you can simply add this lines to the .htaccess file in the directory of the script:
php_value display_errors 1
php_value display_startup_errors 1
php_value error_reporting 2147483647