mardi 6 février 2018

Unexpected token b in position 0

I am having Unexpected token b in position 0 from the json that I returned in my php file to my javascript.

    $file = array(
            array(
                'src' => 'http://localhost/grapesjs-dev/uploads/'.$_FILES['files']['name'][0],
                'width' => '150',
                'height' => '150',
            )
        );

//var_dump(json_encode($file));
return json_encode($file);die;

I have read something that is related to this and could be the solution but I don't know how to change my php code to match the solution that is in this stackoverflow question. link here guys to the post




Aucun commentaire:

Enregistrer un commentaire