issue-with-export-excel

Questionsissue-with-export-excel
Leo Khaskin asked 6 years ago

Hello,

trying to integrate phpgrid into cakephp application.

Grid fails on initialization

$g = new jqgrid($db_conf);

 

Any help greatly appreciated.

Thanks,

Leo

1 Answers
Abu Ghufran Staff answered 6 years ago

What i recommend is to place the lib/inc folder in “plugins/phpgrid/lib/inc”.

Then in controller, you can have: e.g.

namespace App\Controller;

use Cake\Core\Configure;
use Cake\Http\Exception\ForbiddenException;
use Cake\Http\Exception\NotFoundException;
use Cake\View\Exception\MissingTemplateException;
use Cake\Event\Event;

require_once(ROOT . DS . ‘plugins’ . DS . ‘phpgrid’ . DS . ‘lib’ . DS . ‘inc’ . DS . ‘jqgrid_dist.php’);
use jqgrid;

and later you can have controller method using this object.

public function grid()
{
// Database config file to be passed in phpgrid constructor
$db_conf = array(
“type” => “mysqli”,
“server” => “127.0.0.1”,
“user” => “root”,
“password” => “”,
“database” => “test”
);

$g = new jqgrid($db_conf);


}

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

15 + 7 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?