JSON and php . .
still a beginner on php i'm trying to get data from my sql table into an
iphone app, i decided to use JSON to do so.
To get my data i use :
mysql_connect($config['mysql_host'],$config['mysql_user'],$config['mysql_pass']);
//select database
@mysql_select_db($config['db_name']) or die( "Unable to select database");
mysql_query('SET CHARACTER SET utf8');
$fet=mysql_query('select * from actualites');
$json = array();
while($r=mysql_fetch_array($fet)){
$json[] = $r;
}
echo $json_data=json_encode($json);
When i print the result into my browser, the json appears but i have a big
NOT FOUNT with the following :
Not Found
The requested URL /"http:////www.youtube.com//embed//uspc5ZS-YLI/" was not
found on this server.
And so the JSON file is imcomplete ! I have searched the web but found
nothing !
What do i do wrong ?
Thank you very much !
No comments:
Post a Comment