PHP write to file

前端 未结 6 1903
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-15 14:49

below is some code I am using to \"translate\" a map array into SQL code so I can easily update my database when I have updated my game map. As you can see it prints out the

6条回答
  •  深忆病人
    2021-01-15 15:06

    There is an even simpler approach:

    ob_start();
    # Your code here ...
    file_put_contents('yourfile.txt', ob_get_clean());
    

提交回复
热议问题