I am attempting to return the amount of objects in a container. When loading the page it shows only the bit of text ‘number of objects: ‘ and no number.
No errors show when loading the page, its connecting to the cloud and the container name is correct too.
require('../../rackspace_store/cloudfiles.php'); // cloud info $username = "username"; $key = "key"; // Connect to Rackspace $auth = new CF_Authentication($username, $key); $auth->authenticate(); $conn = new CF_Connection($auth); $files = $conn->get_container("containername"); print "Number of Objects: ". $files->count ."\n"; $conn->close();
$c =$ conn->get_container(“my_container”);
object_count and bytes_used should give you the two attributes you are looking for.