【问题标题】:Inventory Management System PHPGrid库存管理系统 PHPGrid
【发布时间】:2018-06-25 02:02:07
【问题描述】:

我正在尝试使用wamp 复制phpGrid 的演示。

我当前的 PHP 版本是5.6.31

当我尝试查看Products.php 页面时,它显示致命错误:

类 'phpGrid\C_DataGrid' 未在 C:\wamp64\www\inventory-manager-master\inventory-manager-master\products.php 第 16 行

会不会是我的php版本低了?

我应该升级到 Php7 还是最好的解决方案?

提前致谢。

放轻松,因为我是菜鸟。

代码如下。

<?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);

【问题讨论】:

  • 欢迎来到stackoverflow。一些代码会很好,最好来自抛出错误的文件。
  • PHPGrid 说它会在 PHP5.6.31 上运行吗?
  • 对不起,代码如下。这是 PHPGrid 演示的原始代码。我已经改变了问题。

标签: php wamp phpgrid


【解决方案1】:

免费的 phpGrid Lite 不需要命名空间

use phpGrid\C_DataGrid;

其实你试试会报错的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-27
    • 2019-06-25
    • 2012-01-09
    • 1970-01-01
    • 2016-07-12
    • 1970-01-01
    相关资源
    最近更新 更多