I am working on wordpress file, and I am having trouble with displaying total download count.
"Download count" is a number that I have saved in a text file "count.txt" located on server inside the active theme file.
Now in order to display the count, I am using the below code.
<?php
$url= echo get_the_title();
echo file_get_contents( "http://example.com/wp-content/themes/themename/download/$url/count.txt" );
//the URL of the text file consist of current wordpress post title.
?>
This code is unable to display count.txt . Please help me out