开发者

PHP Key value FOREACH

开发者 https://www.devze.com 2023-02-24 23:45 出处:网络
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 50

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

0

精彩评论

暂无评论...
验证码 换一张
取 消