FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » Slash problem
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Slash problem [message #31904] Tue, 23 May 2006 17:40 Go to next message
esm2002 is currently offline  esm2002   United States
Messages: 339
Registered: May 2002
Location: Atlanta Georgia
Karma: 0
Senior Member
when I save a file, I'm getting slashes added to the data.

If I have the following:
$path = "../aameta/";


it becomes

$path = \"../aameta/\";


when I save it.


if I save it again, it addes the "\" again

$path = \\\"../aameta/\\\";




here is the code to save the file:

  if ($fp = fopen($file_name_path,"w+"))
  {
    if (fwrite ($fp,$file_data))
    {
      fclose($fp);
      $message = "SUCCESS...! Data saved to $file_name";
    } else {
      $message = "Data NOT saved. Could not write data to $file_name";
    }
  } else {
    $message = "Could not open $file_name. Data NOT Saved";
  }


Can someone help me? Confused




Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Re: Slash problem [message #31925 is a reply to message #31904] Wed, 24 May 2006 13:52 Go to previous message
JamesS is currently offline  JamesS   United States
Messages: 275
Registered: July 2002
Location: Atlanta, GA
Karma: 0
Senior Member
You might want to look at http://www.php.net/manual/en/function.serialize.php
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Logging users into the forum from a separate site
Next Topic: remote connection to mysql from php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 14:29:34 GMT 2024

Total time taken to generate the page: 0.02338 seconds