file_get_contents() failing. PHP -


the following 2 lines of code work. save data here , here down successfully. can see files on server.

file_put_contents("vix.json", fopen("https://www.quandl.com/api/v3/datasets/yahoo/index_vix.json?api_key=example", 'r')); file_put_contents("aaa.json", fopen("https://www.quandl.com/api/v3/datasets/moody/daaayld.json?api_key=example", 'r')); 

i can pull data first file using this:

$v = file_get_contents("vix.json"); 

but following stopping php script:

$a = file_get_contents("aaa.json"); 

i comment out above line , script runs, include , fails.

error:

php parse error:  syntax error, unexpected '$a' (t_variable) 

work in progress. googling error. de-bug pointers/suggestions appreciated.

it's tiny little issues face hardest ones. future reference while developing, have error reporting turned on can pick errors this.

ini_set('display_errors', 1); error_reporting(-1); 

which led error, meaning missing semi-colon(;) somewhere before defined $a variable.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -