4images Forum & Community

General / Allgemeines => Programming => Topic started by: GaYan on November 17, 2009, 04:23:20 PM

Title: urgent help = ERROR
Post by: GaYan on November 17, 2009, 04:23:20 PM
Code: [Select]
<?php
$mybody 

urldecode($_POST[&quot;body&quot;]);if(!$mybody){
print &
quot;&returnMe=Server Error!&quot;;
exit;
}else{
$filefopen(&quot;images.xml&quot;, 
&
quot;w&quot;);fwrite($file, &quot;$mybody&quot;);
fclose($file);
print &
quot;&returnMe=File 
saved
&file=&quot;.$mybody.&quot;&&quot;;}
?>

I downloaded a open source code from the internet...t gives me a erroe..hope experts can fix it :)

Thanks in advance!
Title: Re: urgent help = ERROR
Post by: V@no on November 18, 2009, 12:30:43 AM
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 &quot; with "

[EDIT]
Eh, what a heck, here you go
Code: [Select]
<?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!&";
  }
}
?>
Title: Re: urgent help = ERROR
Post by: GaYan on November 19, 2009, 03:48:42 PM
Thanks.it worked :) !

the error was in the line 3 ! now it has disappeared :) thanks ! thanks in advance !