[pmwiki-users] Data storage project

The Editor editor at fast.st
Mon Jul 31 22:34:57 CDT 2006


Ahhh, thanks Kathryn.  Actually I had tried that but got bad results
because of 3 other problems in the recipe.  Finally figured them all
out and have the recipe basically working.  I'm actually in the
process of uploading it right now.

Thanks for the help!  I appreciate it.  I enjoy this stuff -- but
don't really know what I'm doing with php.  So even simple helps,
well... help!

Cheers,
Caveman





On 7/31/06, Kathryn Andersen <kat_lists at katspace.homelinux.org> wrote:
> On Mon, Jul 31, 2006 at 11:43:34AM -0400, The Editor wrote:
> > # Function called by directive to retrieve form data
> > function ReadData($l) {
> >  global $WorkDir;
> >  $datapage = substr($l, 1);
> >  clearstatcache();
> >  if ($dr = fopen("$WorkDir/$datapage", "rb")){
> >        $pc = fread($dr, filesize("$WorkDir/$datapage"));
> >    fclose($dr);
> >        $dc = explode("(:comment data:) %0a%0a", $pc);
> >        $db = explode(" %0a%0a", $dc[1]);
> >        foreach ($db as $df) {
> >                $dv = explode ("=", $df);
> >                $f = "\${$dv[0]}";  //also "$$dv[0]" seems to work
> >                $v = $dv[1];
> >                $FmtPV['$f'] = $v;  //problem seems to be here
> >               return "$f + $v + $FmtPV[$f] + $FmtPV[$profile]";  // used for debudding
> >                }
> >        return;
> >  }
> >  return "data not found";
> > }
>
> Er, shouldn't you have
>         global $WorkDir, $FmtPV;
>
> Otherwise you'll be just changing a local version of $FmtPV and not
> affecting the real one.
>
> Kathryn Andersen
> --
>  _--_|\     | Kathryn Andersen  <http://www.katspace.com>
> /      \    |
> \_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
>       v     |
> ------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
> Maranatha!  |   -> Earth -> Sol -> Milky Way Galaxy -> Universe
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
>




More information about the pmwiki-users mailing list