Welcome Guest, Not a member yet? Register   Sign In
How to integrate Python with PHP?
#5

(01-19-2020, 05:08 AM)jreklund Wrote: The only way I know are to read the content of the file. Append your new data at the beginning and saving it again.

Depending on what you are doing with the file (parsing?) you can reverse it (after it have been read) with PHP if you want the end at the beginning.

What does \b do? Never used it.

Anything done with fwrite from the beginning has the problem with overwriting any text that is ahead so appending from the end as "a" does, avoids that overwriting. I would like to know how to "reverse it after it has been read". But I'm not sure if you & I are thinking of the same function. It is the last message that I want at the top, not end at the beginning. I should get the last message at the top by using fseek & fwrite but the overwriting makes that impossible.

Apparently backspace \b works in other languages & I assume includes Python, but it doesn't work in PHP. Backspace \b is similar to Newline \n.
Reply


Messages In This Thread
RE: How to integrate Python with PHP? - by christaliise - 01-19-2020, 08:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB