Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to a file above the current folder? Dumb question...

Status
Not open for further replies.

tristero

Programmer
Jan 24, 2003
95
US
I know this is a really dumb question, but, what do i have to write in order to specify a file in a folder above the cgi folder?

For example(Perl):

Code:
$outfile = '/dat/outfile.dat';
--will write the file /cgi/dat/outfile.dat

what if the directory tree is:

Code:
>/html/
   |
>>>/cgi/
     |
>>>>>/dat/

and I wanted to write the outfile to /html/outfile.dat, but my script is in /html/cgi?
-Very basic stuff, i know. I'm still pretty new to the cgi game and I've never had to do this before... Thank you
 
open(OUTFILE,">[red]../[/red]outfile.dat") or die "Failed to open output file, $!\n"; 'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top