ccampbell/chromephp

Auto include on every page

beardedlinuxgeek opened this issue · 3 comments

In php.ini there is a config option called auto_prepend_file.

http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file

If you set that option to something like

auto_prepend_file = /var/www/ChromePhp.php

Then the script will be automatically be included on every page. It's great for when you're working on a team project and not everyone is using the same environment as you. You don't have to commit ChromePhp to your version control system or leave include statements all over the place. It also just saves time in general.

Perhaps you could add this information to the Readme? I'm sure a lot of people would benefit from this knowledge.

👍

👍

@beardedlinuxgeek you know that there is autoloading in PHP? Just asking because with an autoloader that is conditionally. It won't include the class just because you're invoking PHP, but only if needed.

Next to that, it seems that if someone who uses this class and doesn't know how to configure PHP or use autoloading, setting include paths etc. pp. it's perhaps better to suggest some PHP training in README than anything else. My 2 cents.