[eluser]Aspi[/eluser]
Hi Forum members!
I have a litle problem I enabled in config query_string
Code:
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
and my code controllers=>grid_xml
Code:
....
public function grid_xml($which){
//$posStart = //$this->input->get($posStart)
$this->load->model('MGridXml');
$posStart = 0;
$count = 10;
if($posStart == 0){
$totalCount = $this->MGridXml->countAll($which);
}
$from = $posStart;
$grid_xml = $this->MGridXml->getGridDatas($which,$posStart,$count);
$fields_num = count($grid_xml['fields']);
$response = '<?xml version="1.0" encoding="utf-8"?>';
$response .= "<rows total_count='".$totalCount."' pos='".$posStart."'>";
foreach($grid_xml['data'] as $xml)
{
$response .='<row id="'.$xml['iktatasID'].'">';
for($i=0;$i<$fields_num;$i++)
{
$fieldname = $grid_xml['fields'][$i];
//if($fieldtype == "string")
$response .= '<cell><![CDATA['.$xml[''.$fieldname.''].']]></cell>';
//else
//$response .= '<cell>'.$xml[''.$fieldname.''].'</cell>';
}
$response .='</row>';
}
$response .='</rows>';
$this->output->set_output($response);
$this->output->set_content_type("content-type: text/xml");
$this->output->set_header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
$this->output->set_header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
$this->output->set_header('Cache-Control: no-cache, must-revalidate');
$this->output->set_header('Pragma: no-cache');
}
and finaly my url:http://localhost/infobase_web/index.php?c=gridxml&m=grid_xml&which=iktatas
error:
A PHP Error was encountered
Severity: Warning
Message: Missing argument 1 for GridXml::grid_xml()
Filename: controllers/gridxml.php
Line Number: 57
Thank you