简体   繁体   中英

Inventory Management System PHPGrid

I'm trying to replicate this demo of phpGrid using wamp .

My current PHP's version is 5.6.31 .

When I try to view the Products.php page it says Fatal error:

Class 'phpGrid\\C_DataGrid' not found in C:\\wamp64\\www\\inventory-manager-master\\inventory-manager-master\\products.php on line 16

Could it be that my php version is lower?

Should I upgrade to Php7 or what's the best solution?

Thanks in advance.

Go easy on me as I am a noob.

The code is as follows.

<?php
use phpGrid\C_DataGrid;

include_once("phpGrid/conf.php");
include_once('inc/head.php');
?>

<h1>My Inventory Manager</h1>

<?php
$_GET['currentPage'] = 'products';
include_once('inc/menu.php');
?>

<?php
$dgProd = new C_DataGrid('SELECT * FROM products', 'id', 'products');
$dgProd->set_col_hidden('id', false);
$dgProd->enable_autowidth(true)->set_dimension('auto', '200px')-
>set_pagesize(100);

The free phpGrid Lite does not require the namespace

use phpGrid\C_DataGrid;

In fact, it will throw an error if you try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM