Ok I have a file that is trying to retrive job numbers out of a database call and then put them into key value pairs to return to my jquery function that will export them to my page. I am getting a 500 error when I try to run the page and it is on this page. What am I doing wrong with this output/call?
$output = new array();
$job = new job;
$jobs = $job->get_from_db( "`c开发者_开发问答ode` = '" . $_GET['term'] . "'" );
foreach ( $jobs as $key => $current)
{
$output[$key]['value'] = $current->code;
$output[$key]['id'] = $current->id;
}
echo json_encode($output);
Look in logs - /var/logs/apache2/error.log And check (filter) $_GET['term'] for injection
500 means try chmod 777 permissions ussually
精彩评论