Author Topic: urgent help = ERROR  (Read 3009 times)

0 Members and 1 Guest are viewing this topic.

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
urgent help = ERROR
« 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!
I'm Back :)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: urgent help = ERROR
« Reply #1 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!&";
  }
}
?>
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: urgent help = ERROR
« Reply #2 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 !
I'm Back :)