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...
.



Relevant Pages

  • Re: help on fopen
    ... make a drag and drop script, to drag and drop files and maps on one ... Since you want it in an array anyway, ...
    (comp.lang.php)
  • Re: Script to modify NIS maps
    ... via a script. ... I have been trying to accomplish this via sed, Perl, ... There are numerous maps I would be looking to edit via the tool/ ... awk -f remove.awk target=foo3 datafile ...
    (comp.unix.shell)
  • Re: Script to modify NIS maps
    ... via a script. ... I have been trying to accomplish this via sed, Perl, ... There are numerous maps I would be looking to edit via the tool/ ... awk -f remove.awk target=foo3 datafile ...
    (comp.unix.shell)
  • Re: Map editing software
    ... Why not upload some useful deity scripts/tools such as these to ... maps that had exact duplicates of islands ... I sometimes make that script put sectors in various territories to help ...
    (rec.games.empire)
  • Re: To drag a file as parameter to script
    ... I have never drag and dropped .prn files to a printer, ... Yes, it is a nuisance to see the word window pop up on the screen, but it is ... .prn files to the script as prarameter, then they can get the printout. ...
    (microsoft.public.scripting.wsh)