Escaping quotation marks in PHP

后端 未结 7 2054
醉梦人生
醉梦人生 2020-11-21 23:49

I am getting a parse error, and I think it\'s because of the quotation marks over \"time\". How can I make it treat it as a whole string?



        
7条回答
  •  星月不相逢
    2020-11-22 00:41

    Save your text not in a PHP file, but in an ordinary text file called, say, "text.txt"

    Then with one simple $text1 = file_get_contents('text.txt'); command have your text with not a single problem.

提交回复
热议问题