unable to get grid to display

Questionsunable to get grid to display
Bob asked 10 years ago

I downloaded and installed the free version of PHP Grid.
I ran the installation file and entered all of my data, everything appears ok to this point. (the test data was added to my database)

I created a HTML file based on the getting started information from this website.
Here is the HTML file I am using.

<?php
include("inc/jqgrid_dist.php");
$g = new jqgrid();
$grid["caption"] = "Sample Grid";
$g->set_options($grid);
$g->table = "clients";
$out = $g->render("list1");
?>
<html>
<head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
<!– these css and js files are required by php grid –>
<link rel="stylesheet" href="js/themes/redmond/jquery-ui.custom.css"></link>
<link rel="stylesheet" href="js/jqgrid/css/ui.jqgrid.css"></link>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
<!– these css and js files are required by php grid –>
</head>
<body>
<div style="margin:10px">
<!– display grid here –>
<?php echo $out?>
<!– display grid here –>
</div>
</body>
</html>

I checked with firebug and found no errors all of the files load with 200 OK results or 304 Not modified.

The page displayed in firefox and IE is the same:

set_options($grid); $g->table = "clients"; $out = $g->render("list1"); ?>

It appears that in the 5th line of code that it drops out of the PHP processor and outputs the rest of the PHP code to the screen.

Any suggestions on what I may be missing or doing wrong?

Thanks

1 Answers
Abu Ghufran answered 10 years ago

This sounds magical (smile). Have you created file with .php extension?
Rest code looks fine, it looks like php parser is not used in it.

Your Answer

4 + 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?