Reputation: 43
I am trying to use txt file hosted at http://terriblytinytales.com/test.txt in php.
I am saving all individual words in a database using mysql.
I am using addslashes()
function like this
$txtFile = addslashes(file_get_contents('http://terriblytinytales.com/test.txt'));
But after successfully saving in the database, the ' in the string I got by file_get_contents('http://terriblytinytales.com/test.txt')
is not replacecd.
only the first ' in we're is replaced and others are same. Please help
Upvotes: 1
Views: 35