I encountered a problem today that when using fwrite to write a txt file, I can’t use rn to wrap the line
I tried for a long time but couldn’t find a solution!
Suddenly I thought of something I had seen in a book before, but I still used this thing. Solved!
Write it now to prevent forgetting in the future and hope it can help friends who need help!
Look at the code directly:
Copy code The code is as follows:
$stream = fopen("robots.txt", "w+");
fwrite($stream, "you Have you changed the line?rnI have already changed the line!");
?>
http://www.bkjia.com/PHPjc/328146.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/328146.htmlTechArticleI encountered a problem today. When using fwrite to write a txt file, using rn cannot wrap the line. I tried for a long time but couldn’t find it. Way! Suddenly I thought of something that I saw in a book before but still used this...