亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cgi.html.en

?? Apache V2.0.15 Alpha For Linuxhttpd-2_0_15-alpha.tar.Z
?? EN
?? 第 1 頁 / 共 2 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><title>Apache Tutorial: Dynamic Content with CGI</title><link rev="made" href="mailto:rbowen@rcbowen.com"></head><!-- Background white, links blue (unvisited), navy (visited), red (active) --><body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#000080"alink="#FF0000"><!--#include virtual="header.html" --><h1 align="CENTER">Dynamic Content with CGI</h1><a name="__index__"></a> <!-- INDEX BEGIN --> <ul><li><a href="#dynamiccontentwithcgi">Dynamic Content withCGI</a></li><li><a href="#configuringapachetopermitcgi">Configuring Apache topermit CGI</a><ul><li><a href="#scriptalias">ScriptAlias</a></li><li><a href="#cgioutsideofscriptaliasdirectories">CGI outside ofScriptAlias directories</a><ul><li><a href="#explicitlyusingoptionstopermitcgiexecution">Explicitly usingOptions to permit CGI execution</a></li><li><a href="#htaccessfiles">.htaccess files</a></li></ul></li></ul></li><li><a href="#writingacgiprogram">Writing a CGI program</a><ul><li><a href="#yourfirstcgiprogram">Your first CGI program</a></li></ul></li><li><a href="#butitsstillnotworking">But it's still notworking!</a><ul><li><a href="#filepermissions">File permissions</a></li><li><a href="#pathinformation">Path information</a></li><li><a href="#syntaxerrors">Syntax errors</a></li><li><a href="#errorlogs">Error logs</a></li></ul></li><li><a href="#whatsgoingonbehindthescenes">What's going on behindthe scenes?</a><ul><li><a href="#environmentvariables">Environment variables</a></li><li><a href="#stdinandstdout">STDIN and STDOUT</a></li></ul></li><li><a href="#cgimoduleslibraries">CGI modules/libraries</a></li><li><a href="#formoreinformation">For more information</a></li></ul><!-- INDEX END --><hr><h2><a name="dynamiccontentwithcgi">Dynamic Content withCGI</a></h2><table border="1"><tr><td valign="top"><strong>Related Modules</strong><br><br><a href="../mod/mod_alias.html">mod_alias</a><br><a href="../mod/mod_cgi.html">mod_cgi</a><br></td><td valign="top"><strong>Related Directives</strong><br><br><a href="../mod/mod_mime.html#addhandler">AddHandler</a><br><A HREF="../mod/core.html#options">Options</a><br><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a><br></td></tr></table><p>The CGI (Common Gateway Interface) defines a way for a web serverto interact with external content-generating programs, which are oftenreferred to as CGI programs or CGI scripts.  It is the simplest, andmost common, way to put dynamic content on your web site. Thisdocument will be an introduction to setting up CGI on your Apache webserver, and getting started writing CGI programs.</p><hr><h2><a name="configuringapachetopermitcgi">Configuring Apache topermit CGI</a></h2><p>In order to get your CGI programs to work properly, you'll need tohave Apache configured to permit CGI execution. There are several waysto do this.</p><h3><a name="scriptalias">ScriptAlias</a></h3><p>The <code>ScriptAlias</code> directive tells Apache that aparticular directory is set aside for CGI programs. Apache will assumethat every file in this directory is a CGI program, and will attempt toexecute it, when that particular resource is requested by a client.</p><p>The <code>ScriptAlias</code> directive looks like:</p><pre>        ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/</pre><p>The example shown is from your default <code>httpd.conf</code>configuration file, if you installed Apache in the default location.The <code>ScriptAlias</code> directive is much like the<code>Alias</code> directive, which defines a URL prefix that is tomapped to a particular directory. <code>Alias</code> and<code>ScriptAlias</code> are usually used for directories that areoutside of the <code>DocumentRoot</code> directory. The differencebetween <code>Alias</code> and <code>ScriptAlias</code> is that<code>ScriptAlias</code> has the added meaning that everything underthat URL prefix will be considered a CGI program. So, the example abovetells Apache that any request for a resource beginning with<code>/cgi-bin/</code> should be served from the directory<code>/usr/local/apache/cgi-bin/</code>, and should be treated as a CGIprogram.</p><p>For example, if the URL<code>http://dev.rcbowen.com/cgi-bin/test.pl</code> is requested,Apache will attempt to execute the file<code>/usr/local/apache/cgi-bin/test.pl</code> and return the output.Of course, the file will have to exist, and be executable, and returnoutput in a particular way, or Apache will return an error message.</p><h3><a name="cgioutsideofscriptaliasdirectories">CGI outside ofScriptAlias directories</a></h3><p>CGI programs are often restricted to <code>ScriptAlias</code>'eddirectories for security reasons.  In this way, administrators cantightly control who is allowed to use CGI programs.  However, if theproper security precautions are taken, there is no reason whyCGI programs cannot be run from arbitrary directories.  For example,you may wish to let users have web content in their home directorieswith the <code>UserDir</code> directive. If they want to have theirown CGI programs, but don't have access to the main<code>cgi-bin</code> directory, they will need to be able to run CGIprograms elsewhere.</p><h3><a name="explicitlyusingoptionstopermitcgiexecution">Explicitly usingOptions to permit CGI execution</a></h3><p>You could explicitly use the <code>Options</code> directive, insideyour main server configuration file, to specify that CGI execution waspermitted in a particular directory:</p><pre>        &lt;Directory /usr/local/apache/htdocs/somedir&gt;                Options +ExecCGI        &lt;/Directory&gt;</pre><p>The above directive tells Apache to permit the execution of CGIfiles. You will also need to tell the server what files are CGI files.The following <code>AddHandler</code> directive tells the serverto treat all files with the <code>cgi</code> or <code>pl</code>extension as CGI programs:</p><pre>     AddHandler cgi-script cgi pl</pre><h3><a name="htaccessfiles">.htaccess files</a></h3><p>A <code>.htaccess</code> file is a way to set configurationdirectives on a per-directory basis. When Apache serves a resource, itlooks in the directory from which it is serving a file for a filecalled <code>.htaccess</code>, and, if it finds it, it will applydirectives found therein. <code>.htaccess</code> files can be permittedwith the <code>AllowOverride</code> directive, which specifies whattypes of directives can appear in these files, or if they are notallowed at all. To permit the directive we will need for this purpose,the following configuration will be needed in your main serverconfiguration:</p><pre>        AllowOverride Options</pre><p>In the <code>.htaccess</code> file, you'll need the followingdirective:</p><pre>        Options +ExecCGI</pre><p>which tells Apache that execution of CGI programs is permitted inthis directory.</p><hr><h2><a name="writingacgiprogram">Writing a CGI program</a></h2><p>There are two main differences between ``regular'' programming, andCGI programming.</p><p>First, all output from your CGI program must be preceded by aMIME-type header. This is HTTP header that tells the client what sortof content it is receiving. Most of the time, this will look like:</p><pre>        Content-type: text/html</pre><p>Secondly, your output needs to be in HTML, or some other format thata browser will be able to display. Most of the time, this will be HTML,but occasionally you might write a CGI program that outputs a gifimage, or other non-HTML content.</p><p>Apart from those two things, writing a CGI program will look a lotlike any other program that you might write.</p><h3><a name="yourfirstcgiprogram">Your first CGI program</a></h3><p>The following is an example CGI program that prints one line to yourbrowser. Type in the following, save it to a file called<code>first.pl</code>, and put it in your <code>cgi-bin</code>directory.</p><pre>        #!/usr/bin/perl        print "Content-type: text/html\r\n\r\n";        print "Hello, World.";</pre><p>Even if you are not familiar with Perl, you should be able to seewhat is happening here. The first line tells Apache (or whatever shellyou happen to be running under) that this program can be executed byfeeding the file to the interpreter found at the location<code>/usr/bin/perl</code>. The second line prints the content-typedeclaration we talked about, followed by two carriage-return newline

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品日韩一区二区三区| 樱花草国产18久久久久| 成人禁用看黄a在线| 亚洲精品成人少妇| 91精品午夜视频| 蜜臀久久99精品久久久画质超高清| 国产日韩av一区| 在线观看成人小视频| 久久福利视频一区二区| 亚洲欧美另类在线| 欧美成人a∨高清免费观看| 91网站最新地址| 国产最新精品精品你懂的| 久久综合色鬼综合色| 欧美日韩一区二区欧美激情 | 日韩视频一区二区三区 | 日韩精品久久理论片| 欧美激情一区不卡| 91极品美女在线| 成人免费毛片嘿嘿连载视频| 日本女优在线视频一区二区| 亚洲欧美日韩国产手机在线| 久久久久国产精品麻豆ai换脸| 色偷偷成人一区二区三区91 | 欧美乱熟臀69xxxxxx| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲午夜久久久| 亚洲欧洲制服丝袜| 国产精品美女久久久久高潮| 国产亚洲精久久久久久| 日韩欧美激情一区| 欧美一区二区在线免费观看| 777久久久精品| 欧美高清激情brazzers| 欧美日韩一区二区三区免费看 | 欧美一区二区三区婷婷月色| 欧美三区免费完整视频在线观看| 色菇凉天天综合网| 91国模大尺度私拍在线视频| 色诱视频网站一区| 91首页免费视频| 91搞黄在线观看| 欧美色男人天堂| 欧美日韩国产一二三| 在线成人高清不卡| 91精品国产全国免费观看| 91精品国产麻豆| 精品乱人伦一区二区三区| 欧美不卡视频一区| 国产视频一区二区三区在线观看| 久久久久久久综合色一本| 国产片一区二区| 亚洲人成网站影音先锋播放| 有码一区二区三区| 日韩经典一区二区| 麻豆成人免费电影| 成人一区在线观看| 色婷婷av一区二区三区大白胸 | 99久久久国产精品| 色国产综合视频| 91精品国产欧美一区二区18 | 国产精品伦理一区二区| 亚洲欧美另类综合偷拍| 亚洲成人av电影在线| 美脚の诱脚舐め脚责91| 国产高清不卡二三区| 在线一区二区视频| 制服.丝袜.亚洲.另类.中文| 久久蜜桃av一区精品变态类天堂| 国产精品卡一卡二| 午夜精品视频一区| 国精产品一区一区三区mba视频 | 欧美xxxxxxxx| 亚洲天堂久久久久久久| 日韩精品电影一区亚洲| 成人性视频免费网站| 欧美日韩黄色影视| 国产无一区二区| 亚洲一级电影视频| 久久成人18免费观看| 99国产精品久久久久久久久久| 欧美日韩一区二区欧美激情| 久久久久久久久久久电影| 亚洲免费观看高清完整版在线观看 | 色婷婷综合五月| 欧美哺乳videos| 一区二区成人在线| 国产精品综合视频| 7777精品伊人久久久大香线蕉经典版下载 | 99久久婷婷国产综合精品| 911国产精品| 国产精品午夜久久| 麻豆一区二区在线| 色综合久久综合网97色综合| 精品久久久网站| 亚洲综合视频在线| 国产成人a级片| 日韩欧美一级在线播放| 亚洲综合小说图片| 成人99免费视频| 精品女同一区二区| 亚洲国产日韩a在线播放性色| 福利一区二区在线观看| 精品国产伦一区二区三区免费| 一区二区高清在线| av在线一区二区| 久久亚洲精华国产精华液| 日韩不卡一二三区| 日本高清不卡在线观看| 亚洲欧美自拍偷拍色图| 国产成人亚洲综合a∨婷婷| 日韩欧美色电影| 日本最新不卡在线| 欧美疯狂性受xxxxx喷水图片| 亚洲欧美色一区| 成人少妇影院yyyy| 久久久精品黄色| 久久丁香综合五月国产三级网站| 色先锋久久av资源部| 中文字幕佐山爱一区二区免费| 国产精品亚洲专一区二区三区 | 极品尤物av久久免费看| 欧美日韩1区2区| 成人美女在线视频| 欧美精品日韩一本| 亚洲精品一线二线三线| 91麻豆精品国产91久久久久久 | 精品国产自在久精品国产| 亚洲午夜久久久久久久久久久| 97久久精品人人爽人人爽蜜臀 | 亚洲一区在线看| 国产999精品久久久久久绿帽| 精品乱码亚洲一区二区不卡| 美女看a上一区| 久久一区二区视频| 国产一区二区三区免费观看| 精品国产乱码久久久久久免费 | 日韩美女精品在线| 国产精品一二三| 国产三级欧美三级日产三级99| 久久国产剧场电影| 久久久精品日韩欧美| 国产成a人无v码亚洲福利| 国产色一区二区| 99精品视频在线免费观看| 亚洲欧美日韩国产成人精品影院| 色素色在线综合| 一区二区久久久久久| 欧美肥大bbwbbw高潮| 奇米色一区二区三区四区| 精品乱码亚洲一区二区不卡| 高清不卡在线观看| 亚洲精选免费视频| 欧美日韩国产另类一区| 久久成人综合网| 国产精品伦理在线| 欧美日韩免费一区二区三区视频 | 成人国产电影网| 亚洲精品网站在线观看| 欧美色精品在线视频| 激情六月婷婷久久| 综合中文字幕亚洲| 欧美日韩国产免费一区二区 | 亚洲欧洲性图库| 在线观看91视频| 九色综合狠狠综合久久| 欧美激情综合在线| 欧美日韩国产在线观看| 国产一区二区三区香蕉| 成人免费在线观看入口| 欧美精品黑人性xxxx| 国产剧情一区在线| 亚洲国产欧美日韩另类综合| 精品久久久久久久久久久院品网| 国产成人一区二区精品非洲| 亚洲在线视频免费观看| 欧美v亚洲v综合ⅴ国产v| 色综合久久综合网97色综合 | 在线区一区二视频| 久久 天天综合| 亚洲国产综合在线| 久久精品一区二区| 欧美日韩国产天堂| 国产精品白丝jk黑袜喷水| 亚洲自拍偷拍麻豆| 日本一区二区三区视频视频| 欧美日韩久久久久久| 国产高清精品在线| 日本视频在线一区| 《视频一区视频二区| 欧美v日韩v国产v| 欧美日韩专区在线| 成人美女在线视频| 看片的网站亚洲| 亚洲图片欧美视频| **欧美大码日韩| 久久久久久久久久久久久久久99 | 国产99精品视频| 免播放器亚洲一区| 亚洲图片欧美一区|