your problem is likely due to using relative file paths
if you goto
example.org/index.php
your script would look for the file here
doc_root/rotator/rotate1.txt
now if you goto
example.org/somedir/index.php
your script would look for the file here
doc_root/somedir/rotator/rotate1.txt
ad it prob doesnt exist there....
in your case, when you got that error, this is where php was looking for the file
/usr/local/etc/httpd/htdocs/politicalcafeorg/rotator/rotate1.txt
you could use an absolute file path instead
$contfile = $_SERVER['DOCUMENT_ROOT'] . "/rotator/".$rotid;
that way the location of the file will not depend on where your running the code from