- Getting Started
- Fundamentals
- Working with Forms
- Working with Databases
- Caching
- Extending Yii
- Testing
- Special Topics
Entry script is the bootstrap PHP script that handles user requests initially. It is the only PHP script that end users can directly request to execute.
In most cases, entry script of a Yii application contains the code that is as simple as follows,
// remove the following line when in production mode defined('YII_DEBUG') or define('YII_DEBUG',true); // include Yii bootstrap file require_once('path/to/yii/framework/yii.php'); // create application instance and run $configFile='path/to/config/file.php'; Yii::createWebApplication($configFile)->run();
The script first includes the Yii framework bootstrap file yii.php. It
then creates a Web application instance with the specified configuration
and runs it.
A Yii application can run in either debug or production mode according to
the constant value YII_DEBUG. By default, this constant value is defined
as false, meaning production mode. To run in debug mode, define this
constant as true before including the yii.php file. Running application
in debug mode is less efficient because it keeps many internal logs. On the
other hand, debug mode is also more helpful during development stage
because it provides richer debugging information when error occurs.
Hi,
would it be possible to benefit from a chapter on the many ways to debug a yii app ?
I know I can make my way through the API but it would be nice to have a few lines on this
TIA
For anyone just getting into PHP development, Eclipse is one good open source option for debugging your projects, including those that use the Yii Framework.
You need to use the PDT (PHP Dev Tools) plugin, and add the yii/framework folder directly into your Eclipse project in order to debug into the library. Don't just add it as an include library, you won't be able to add breakpoints if you reference it that way. (at least as of 10/09)
I would also like to see some information on #129's question.
Where can those logs be seen?