webdevised Posted February 21, 2008 Posted February 21, 2008 I have a cron job that runs a php file that deletes a line out of a txt file once a day this is how i have it set up in the cron in set up. >php -q /home/MYUSERNAME/public_html/resetcounter.php i get this in my email after the cron has run.. ><br /> <b>Warning</b>: fopen(http://www.MYSITE.com/todaycounter.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: HTTP wrapper does not support writeable connections. in <b>/home/MYUSERNAME/public_html/resetcounter.php</b> on line <b>7</b><br /> any ideas?? Thanks Quote
TCH-Bruce Posted February 21, 2008 Posted February 21, 2008 You can't fopen a file using http protocol. Change your fopen to the full path to the file /home/YOURUSERNAME/public_html/todaycounter.txt Quote
webdevised Posted February 21, 2008 Author Posted February 21, 2008 You can't fopen a file using http protocol. Change your fopen to the full path to the file /home/YOURUSERNAME/public_html/todaycounter.txt do that in my resetcounter.php file Quote
TCH-Bruce Posted February 21, 2008 Posted February 21, 2008 Yes, where ever you have the statement fopen statement replace the http://yousite.ext/ with what I have above. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.