json - PHP:file_get_contents() Error -
i using file_get_contents read json data.
my code :
//echo $json_url; $json_data = file_get_contents($json_url);
i surprise that, variable $json_data returns null value. when echo variable $json_url, displays correct url. tt displays json record when manually enter url in browser.
what can error here?
what url?
if you're opening uri special characters, such spaces, need encode uri urlencode().
furthermore, url fopen wrappers enabled?
a url can used filename function if fopen wrappers have been enabled.
but see why request failed if enable error reporting.
Comments
Post a Comment