i MySQL veritabanı ve benim dosyasının a.txt olan içeriği bir metin dosyasının içeriğini eklemek için bir php script yazdım
\n is used for a new line
i want it to be loaded into the database including the special character \n
as it is... But it is loading only " is used for a new line" kindly help me out... thanx
<?php
$filename = "a.txt";
$f = fopen($filename, 'r');
$total_contents = fread($f, filesize($filename));
print $total_contents;
mysql_connect("localhost", "datab_user", "password") or die(mysql_error());
mysql_select_db("datab_name") or die(mysql_error());
mysql_query("INSERT INTO table_name
(id,content) VALUES( 333,'$total_contents' ) ")
or die(mysql_error());
?>