Thread: help on fopen
View Single Post

  #3 (permalink)  
Old 05-08-2008
Joop
 
Posts: n/a
Default Re: help on fopen

Well, just like I said: "It repeats itself". The general idea is to
make a drag and drop script, to drag and drop files and maps on one
and eachother. Releasing the mousebutton submits a form and the php
script is set off with two arrays: $source and $taget, looking
something like:

$source["dir"] = "..";
$source["file"] = "file1.html";
$target["dir"] = "../map1";
$target["file"] = "file3.html";

the idea is that (in this case) the file ../file1.html is placed in
the map ../map1 and in the config file appears after file3.html.

The function works perfectly right now, and echos $new_target quite
nicely. But when I uncomment the part that fopens, fwrites and fcloses
it to config.map the config file looks something like this:

index:file3.html;
file1.html:1;
file1.html:1;
file1.html:1;
file1.html:1;
file3.html:user1;
file1.html:1;
file1.html:user1;

Don't know exactly how many times, but I am trying to make it look
like this:

index:file3.html;
file3.html:user1;
file1.html:user1;

And I don't know about the limboserver-thingy... It's probably a very
good suggestion, but I just wanted to make my own...
Thanks in advance...
Reply With Quote