Welcome Guest, Not a member yet? Register   Sign In
Using PHP DataGrid(PHP Builder) in CodeIgniter

Hi All,

I've been enjoying learning how to use CodeIngniter. I've been using PHP DataGrid (http://phpbuilder.blogspot.com/) to build things with and like the grid object. I'm now wanting to take these pages and put them into the CI framework. This isn't going as smoothly as I wanted. I'm pretty new to Apache/PHP (recovering .NET person) so I know that this HAS to be easy, but it is escaping me.

When I put one of my php DataGrid pages in the view directory, the page largely works, but it gets confused as to the path of where the html subdocuments and images can be found. The path that the final HTML is looking for is:


The anchor in the html is as follows:
<a style="cursor: pointer;" onclick="myRef=window.open(''+self.location+'?_abcexport=true','ExportToExcel','left=20,top=20,width=840,height=630,toolbar=0,resizable=0,location=0,scrollbars=1');myRef.focus()" class="class_a">
<img src="datagrid/images/default/excel_b.gif" onmouseover='this.src="datagrid/images/default/excel_r.gif"' onmouseout='this.src="datagrid/images/default/excel_b.gif"' alt="Export to Excel">

How can I adjust things so that 'this.src="datagrid/images/default/excel_r.gif" reads from http://localhost/CodeIgniter/datagrid/im...xcel_b.gif instead?

Thwe function site_url() return the url of your application: if you put your images into a /images folder you get it with a &lt;?=site_url()."images/image.jpg"?&gt;

Theme © iAndrew 2016 - Forum software by © MyBB