Reputation: 11
I am doing a Purchase Ordering Sale System and currently, I try to generate a barcode for each item where those barcodes will be used to add to the cart once the barcode has been scanned.
So I follow a tutorial from this site Inventory Management System, using the barcode generator library, phpGrid library and phpChart library. I also already configure the conf.php.
The problem is when I type C_DataBase into my code, it says undefined type phpGrid\C_DataBase.
barcodelisting.php
use phpGrid\C_DataBase;
require_once("../../phpGrid/conf.php");
$db = new C_DataBase(PHPGRID_DB_HOSTNAME, PHPGRID_DB_USERNAME, PHPGRID_DB_PASSWORD,
PHPGRID_DB_NAME, PHPGRID_DB_TYPE,PHPGRID_DB_CHARSET);
conf.php
define('PHPGRID_DB_HOSTNAME','localhost');
define('PHPGRID_DB_USERNAME', 'root');
define('PHPGRID_DB_PASSWORD', '');
define('PHPGRID_DB_NAME', 'pos');
define('PHPGRID_DB_TYPE', 'mysql');
define('PHPGRID_DB_CHARSET','utf8mb4');
// *** You should only define SERVER_ROOT manually when use Apache alias directive or
IIS virtual directory ***
define('SERVER_ROOT', str_replace(str_replace('\\', '/',
realpath($_SERVER['DOCUMENT_ROOT'])),'', str_replace('\\', '/',dirname(__FILE__))));
define('THEME', 'start');
define('FRAMEWORK', '');
define('CDN', true);
define('DEBUG', false); // *** MUST SET TO FALSE WHEN DEPLOYED IN PRODUCTION ***
Upvotes: 1
Views: 82
Reputation: 3132
The free version doesn't need namespace phpGrid. So use phpGrid\C_DataBase;
is probalby not needed.
Upvotes: -1