Need Help rewriting script so that it is updated

Hello, I’ve very new to PHP and I have this code that pulls data from a cryptcurrency exchange site. So I need to re-write the files in the command prompt to get updated data.

The problem is that I do not understand how to re-write the files.

Attached below are the list of files for the script along with what I have tried to do to re-write the file

Any help will be greatly appreciated!


file list.PNG

cmd attemp.PNG

Well, how is the data coming in? JSON, XML, CSV? If so, why have it write to a file which could cause file locking while rebuilding, I would recommend either process on each page, or create a database and have the information in there so the record would not lock as it is updated.

Please give us more info on this problem. Your command box shows a program running and can not right to itself.
You can not rewrite your active file that is currently running. There are ways to do it. You can write a a copy of it and
at the end of the program call another that copies the new version over the old version. This works since you would
be doing it in another program outside and it would not alter the running one.

Is this PHP program running on a server or locally? Neither can rewrite over itself if it is running.

Sponsor our Newsletter | Privacy Policy | Terms of Service