我要自己做个网站,用shell scripts写cgi程序。
先记录下cgi的环境变量
CGI Environment Variables
Environment variables are a series of hidden values that the web server sends to every CGI program you run. Your program can parse them and use the data they send. Environment variables are stored in a hash named %ENV:
Key Value
DOCUMENT_ROOT The root directory of your server
HTTP_COOKIE The visitor’s cookie, if one is set
HTTP_HOST The hostname of the page being attempted
HTTP_REFERER The URL of the page that called your program
HTTP_USER_AGENT The browser type of the visitor
HTTPS “on” if the program is being called through a secure server
PATH The system path your server is running under
QUERY_STRING The query string (see GET, below)
REMOTE_ADDR The IP address of the visitor
REMOTE_HOST The hostname of the visitor (if your server has reverse-name-lookups on; otherwise this is the IP address again)
REMOTE_PORT The port the visitor is connected to on the web server
REMOTE_USER The visitor’s username (for .htaccess-protected pages)
REQUEST_METHOD GET or POST
REQUEST_URI The interpreted pathname of the requested document or CGI (relative to the document root)
SCRIPT_FILENAME The full pathname of the current CGI
SCRIPT_NAME The interpreted pathname of the current CGI (relative to the document root)
SERVER_ADMIN The email address for your server’s webmaster
SERVER_NAME Your server’s fully qualified domain name (e.g. www.cgi101.com)
SERVER_PORT The port number your server is listening on
SERVER_SOFTWARE The server software you’re using (e.g. Apache 1.3)
处理form的数据:
又学了几个命令:declear
今天把网站做了个基础的东东。
网站大体成型了,可以根据图片种类添加图片。而且以前修改的上传文件的flash也用上了,总有用武之地啊!
下一步:图片分页浏览。查找种类名写成函数。删除一些目录。
2009-07-02:
今天跟林老师要了源程序,准备再分析一下。自己建个bbs。明天就能分析得差不多了。
我项任务我想都不敢想。。。
句子有点不通顺啊?
Pretty cool post. I just stumbled upon your blog and wanted to say
that I’ve really liked browsing your posts. Anyway
I’ll be subscribing to your feed and I hope you post again soon!
看在你是个外国妞的份上,就贴出来了!