I have a small code like this below (to display random quotes). text quotes is in file quotes.txt.
$quotes=file(\"quotes.txt\");
$number_quotes=count($quotes);
if($number_quotes!==0){$number_quotes.=-1;};
$random=rand(0,$number_quotes);
echo $quotes[$random];
The Question is when i run it on my own server it works correctly but when i put these files on my commercial hosting, it did\'nt work. The message quote will only display at once and it won\'t get random anymore when i press refresh button.
Is this related to PHP server configuration or what?? please helppp.. thanks..