4images Forum & Community
General / Allgemeines => Programming => Topic started by: GaYan on November 17, 2009, 04:23:20 PM
-
<?php
$mybody =
urldecode($_POST["body"]);if(!$mybody){
print "&returnMe=Server Error!";
exit;
}else{
$file= fopen("images.xml",
"w");fwrite($file, "$mybody");
fclose($file);
print "&returnMe=File
saved&file=".$mybody."&";}
?>
I downloaded a open source code from the internet...t gives me a erroe..hope experts can fix it :)
Thanks in advance!
-
first of all, what error?
and second, not sure if it's just this forum doesn't display it right, or it's actually in your code, but replace " with "
[EDIT]
Eh, what a heck, here you go
<?php
$mybody = urldecode(@$_POST["body"]);
if(!$mybody)
{
print "&returnMe=Server Error!&";
}
else
{
if ($file = fopen("images.xml", "w"))
{
fwrite($file, $mybody);
fclose($file);
print "&returnMe=File saved&file=".$mybody."&";
}
else
{
print "&returnMe=Error saving file!&";
}
}
?>
-
Thanks.it worked :) !
the error was in the line 3 ! now it has disappeared :) thanks ! thanks in advance !