我正在尝试在 php中使用托管在http://terriblytinytales.com/test.txt的 txt 文件。我正在使用 mysql 将所有单个单词保存在数据库中。我正在使用addslashes()
这样的功能
$txtFile = addslashes(file_get_contents('http://terriblytinytales.com/test.txt'));
但是成功存入数据库后,我得到的字符串中的'file_get_contents('http://terriblytinytales.com/test.txt')
并没有replacecd。
只有第一个 ' 在 we're 被替换,其他的都是一样的。请帮忙