Environment:Amazon EC2. Ubuntu x64. (GD library installed) I'm recently using phpChart for graph and report in laravel framework. I'm stuck at the beginning stage.
Here's what I've done.
- 1.Unzip the contents in phpChart_Lite to /var/www/app/libraries/phpChart.
2.Edit composer.json and add :
"autoload": { "classmap": [ ... "app/libraries" ] },
3.run:composer dump-autoload
4.modify conf.php in phpChart_Lite
define('SCRIPTPATH',app_path().'/libraries/phpChart_Lite/');
Here's my test page code:
<?php
require_once(app_path()."/libraries/phpChart_Lite/conf.php");
$pc = new C_PhpChartX(array(array(11, 9, 5, 12, 14)),'basic_chart');
$pc->draw();
?>
ps.my app_path() is verified by "echo app_path()" and it is "/var/www/app".
Here's my error message:
Unknown: Failed opening required '/var/www/public//var/www/app/libraries/phpChart_Lite//conf.php'
(include_path='/var/www/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/php:/usr/share/pear')