If you are new to perl and to CGI in general, I'd suggest you go over the
WWW security FAQ:

<http://www.w3.org/Security/Faq/>

It has a section that covers safe CGI scripting in perl.

Writing files in your webserver document tree can be
dangerous. I suggest you take a good look at writing secure code in your
CGI scripts.

On Thu, 26 Jul 2001, Bill Platt wrote:

> Bill,
>
> Thank you. I cannot tell you how much joy I experienced when
> I followed your tip and it worked. Thanks again.
>
>
> Bill Platt  -  Internet Musketeers, Inc.
> Deputy Director for Plans, Operations, Marketing and Systems
>   http://GhostArticles.com      (Promotional Article Creation)
>
> ------------------------------------------------------------------
>
> $Bill Luebkert wrote:
> >
> > Bill Platt wrote:
> > >
> > > Hello,
> > >
> > > I am a perl newbie. I have written maybe a half dozen scripts
> > > and I have spent some time seriously going through tutorials
> > > and other people's scripts to learn my way. With the current
> > > problem I am facing, I have spent most of the last two days
> > > online digging through perl archives on the web searching
> > > for a solution. I have even taken to looking at a lot of the
> > > cgi on my own server looking for clues. I am running Redhat
> > > Linux on an apache server with Perl 5.
> > >
> > > I want to be able to save a new static file from a cgi script
> > > on command.
> > >
> > > I know it is possible. I have seen people do it.
> > >
> > > As an example, I am trying to duplicate the article archiving
> > > feature on a site called makingprofit.com . I need this so
> > > that my team can fill out a form and place our archive files
> > > on our server. Right now, I am having to build all archives
> > > by hand.
> > >
> > > At MakingProfit.com, they have a form for articles that you
> > > fill in and submit to the site. At the same time as the
> > > information is sent to the server, the server will tell you
> > > that you can view the page at its new permanent address at,
> > > for example:
> > >
> > > makingprofit.com/articles/07262001-18.html
> > >
> > > OR at:
> > >
> > > makingprofit.com/articles/07262001-18.txt
> > >
> > > So, I want to be able to take the information from the
> > > form and make it into a html file and a text file.
> > >
> > > I need to find the way to take that information from the
> > > form, and make a new file called 07262001-18.html and put
> > > it in a directory on our server.
> > >
> > > Could someone show me how to do it? I know how to overwrite
> > > or append an existing file, I just do not know how to make
> > > a new one.
> >
> > Same way you overwrite a file.  If it doesn't exist - it will be created.
> >
> >         open OUT, ">$die/$file" or die ...
> >
> > --
> >   ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
> >  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
> >   / ) /--<  o // //      http://dbecoll.webjump.com/ (Free site for Perl)
> > -/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/
>
> --
> _______________________________________________
> Perl-Unix-Users mailing list. To unsubscribe go to 
>http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
>

_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to