简体   繁体   中英

php DataGrid Control

I want to use a grid view control on my php page, But when i use the below code, it gives error that C_DataGrid is not included in the File. How can i include the DataGrid in page, I have downloaded php Lite Grid view also

$dg = new C_DataGrid($hostName, $userName, $password, $dbName);

$dg -> set_gridpath     ("include/");
$dg -> set_sql          ("SELECT * FROM Employees");
$dg -> set_sql_table    ("Employees");
$dg -> set_sql_key      ("EmployeeId");
$dg -> display()

SERVER_ROOT, known as ABS_PATH, shows the absolute URL to the phpGrid library folder on the server. This value tells your script where to find phpGrid library on the web server.

You actually have a very old phpGrid because set_gridpath function is no longer exists in the newer version. Instead the it is set in conf.php as SERVER_ROOT now.

You need to redownload the phpGrid Lite from their site again.

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