简体   繁体   English

库存管理系统PHPGrid

[英]Inventory Management System PHPGrid

I'm trying to replicate this demo of phpGrid using wamp . 我正在尝试使用wamp复制此phpGrid演示。

My current PHP's version is 5.6.31 . 我当前的PHP版本是5.6.31

When I try to view the Products.php page it says Fatal error: 当我尝试查看Products.php页面时,它显示致命错误:

Class 'phpGrid\\C_DataGrid' not found in C:\\wamp64\\www\\inventory-manager-master\\inventory-manager-master\\products.php on line 16 在第16行的C:\\ wamp64 \\ www \\ inventory-manager-master \\ inventory-manager-master \\ products.php中找不到类'phpGrid \\ C_DataGrid'

Could it be that my php version is lower? 可能是我的php版本较低吗?

Should I upgrade to Php7 or what's the best solution? 我应该升级到Php7还是最好的解决方案?

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 免费的phpGrid Lite不需要名称空间

use phpGrid\C_DataGrid;

In fact, it will throw an error if you try. 实际上,如果尝试,它将引发错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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