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?

note:

if you're opening uri special characters, such spaces, need encode uri urlencode().

furthermore, url fopen wrappers enabled?

tip

a url can used filename function if fopen wrappers have been enabled.

but see why request failed if enable error reporting.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -