Problem: Distortion while saving text file.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What could be wrong when this is transformed:
"<img src="graphics/auringonlasku2.jpg" align="left">"
....to this form:
"<img src=\"graphics/auringonlasku2.jpg\" align=\"left\">"

The line is saved to text file with this function:

function savesite($site, $lang, $contents){

if (check_session()){
$file=fopen('content/' . $site . '_' . $lang . '.txt', "w");

fwrite($file, $contents);

fclose($file);
}

I run it through nl2br() before saving and this only happens on Linux server, on Windows server it works fine, no \ before ".

Tested with:
On Windows: Apache2, PHP5
Linux: Debian distro, Apache2, PHP4, also tried with PHP5

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux