fabfuel / prophiler

PHP Profiler & Developer Toolbar (built for Phalcon)
http://prophiler.fabfuel.de
Other
443 stars 54 forks source link

how to add fabfuel/prophiler package to phalcon php #45

Closed gpphong8th2 closed 8 years ago

gpphong8th2 commented 8 years ago

Hi All, when I add fabuel/prophiler package. I have a problem. please preview image below: 2015-10-06_150000

this is my index.php:

<?php use vendor\Fabfuel;

error_reporting(E_ALL);

define('APP_PATH', realpath('..'));

try {

/**
 * Read the configuration
 */
$config = include APP_PATH . "/app/config/config.php";

/**
 * Read auto-loader
 */
include APP_PATH . "/app/config/loader.php";

/**
 * Read services
 */
include APP_PATH . "/app/config/services.php";

/**
 * Handle the request
 */
$application = new \Phalcon\Mvc\Application($di);

echo $application->handle()->getContent();

} catch (\Exception $e) { echo $e->getMessage(); }

$profiler = new \Fabfuel\Prophiler\Profiler();

$toolbar = new \Fabfuel\Prophiler\Toolbar($profiler); $toolbar->addDataCollector(new \Fabfuel\Prophiler\DataCollector\Request()); echo $toolbar->render();

In config.php I add row: 'debugbar' => APP_PATH . '/vendor/', In loader.php I add row: $config->application->debugbar,

it is that all. Help please!

fabfuel commented 8 years ago

Hey,

looks like you did not load the composer autoloader. Add this to the top of your script:

require_once 'vendor/autoload.php';

Or the appropriate path to the file.

Best Fabian

gpphong8th2 commented 8 years ago

it's work!. Thank you