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

Home » General » PHP discussions » Slash problem
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Slash problem [message #31904] Tue, 23 May 2006 13:40 Go to next message
esm2002 is currently offline  esm2002   United States
Messages: 339
Registered: May 2002
Location: Atlanta Georgia
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 09:52 Go to previous message
JamesS is currently offline  JamesS   United States
Messages: 275
Registered: July 2002
Location: Atlanta, GA
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
You might want to look at http://www.php.net/manual/en/function.serialize.php
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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 Oct 19 10:48:55 EDT 2017

Total time taken to generate the page: 0.00622 seconds