r/apache•
fakefading

how to save file from cgi-bin to html folder

How do you save a file from /cgi-bin/ to a folder in /html/?

I have a python script in cgi-bin and i'm trying to create a file in the html directory. I'm trying to figure out which path to use?

eg if current working directory is: /var/www/cgi-bin/test/file.py

f.open(/var/www/html/test/createdFile.txt)
f.write("text\n")
f.close()

Please help.

Posted Oct 18, 2017, 2:54 AM UTC

10

No comments yet

Nobody commented on this post, or the comments weren't captured.