Changing the folder location of the php grid php files. Which line of code to update in the php grid file

QuestionsChanging the folder location of the php grid php files. Which line of code to update in the php grid file
Tony Wolsey asked 10 months ago

Hello

When I change the folder location for the PHP grid files, what line of code do I need to alter in each PHP grid file to be able to locate the config.php file. Is it the one shown below? If so, what does it need to be? What is the format? Not sure what the two “../../” mean (two directories above?)?

// include db config
include_once(“../../config.php”);

thank you

Tony

8 Answers
Abu Ghufran Staff answered 10 months ago

Yes, as the demo files are located e.g. in demos/editing then config is 2 level up.

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Tony Wolsey answered 10 months ago

Thanks Abu. So if the grid php file is located only one directory below the config.php file, then I should use only one level (example 1 below)? I have tried the below with a folder called test that is one level below the config.php folder and it does not seem to work. Does the folder naming matter? I have also tried placing a grid php file in the same directory as the config.php file and it does not work with the 2nd example below. 1st example // include db config include_once(“../config.php”);   2nd example // include db config include_once(“config.php”); thanks Tony

Abu answered 10 months ago

Please view source – ctrl+u and see if you can get html code.

If html is there then you need to adjust the css/js include files path in html code with same level hierarchy.

If there is blank page in view source, then it is a server side error and can be checked by enabling display_error flag to 1 on top of lib/inc/jqgrid_dist.php

Tony Wolsey answered 10 months ago

I get a blank web page when i try to view a grid php file (http://localhost/php_grid/test/autocomplete1.php) that is one level down from the config.php file utilizing the code below.

// include db config
include_once(“../config.php”);

See link to HTML for the blank page

https://gist.github.com/TboneDubu/1899b87a4ea07729920ae902ca46246c

 

thanks

Tony

Abu Ghufran Staff answered 10 months ago

The JS / CSS files path should also be changed to “..” instead of “../..”

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Abu Ghufran Staff answered 10 months ago

The JS / CSS files path should also be changed to “..” instead of “../..”

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Tony Wolsey answered 10 months ago

Thank you Abu. That worked great.

I really appreciate your fast responses!

By the way. This is the best Grid Framework and CRUD Generator I have ever used.  I have tried all of your competitors and more until I stumbled onto your applications and none of the other applications even come close to PHP Grid Framework.  This application is extremely well thought out, very easy to use and the quality of forms/reports that are produced and the UI are exceptional!  Well done!

thanks

Tony

Abu Ghufran Staff answered 9 months ago

Thanks for your highly motivating feedback.

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Your Answer

1 + 20 =

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 / 5. Vote count:

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

Let us improve this post!