PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
This is a file that a scrolling news ticker works off of. I'm trying to make it a little easier to update by setting the client up with a form he can go to and put in the new info and submit. Once it is submitted, it would be in the format above and would replace the old text file.
Thanks for the response... I'm trying the fopen() method and getting errors of "failed to open stream". My clients site is hosted, so I have no access to permissions...
How are you using fopen()? If you placed a URL in the filename, fopen() cannot write to a URL. If the script is local to the server that needs changing, and you've referenced the file using local system pathing, PHP may not be allowed to write to the file or directory.
Try having PHP create the file (or a new file to test). If it can continue making further edits to the file afterward then PHP doesn't have permission to write/execute over the original file. If it continues to fail, PHP likely doesn't have permission to write/execute inside that directory.
There are a few alternates to fopen(). One that springs to mind is FTP. PHP can use its FTP functions (provided you have access to them) to upload a new version of the file to itself. Although more involved, it can get around some permissions issues.