Jump to content

Resource id #6 weird error for simple code


gesseg

Recommended Posts

That's not an error, it's just not what you expected. fopen returns a resource, not the data you're expecting. For that you'll need to use fread. Or instead you can more simply use file_get_contents:

 

$file = 'http://ws.audioscrobbler.com/1.0/user/sandi-g/topartists.txt';
$data = explode(',', file_get_contents($file));
// ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.