Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
a2e268aa
Kaydet (Commit)
a2e268aa
authored
Ara 09, 1997
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Mark file names with \file{} instead of \code{}.
üst
41999c16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
libcgi.tex
Doc/lib/libcgi.tex
+10
-9
libcgi.tex
Doc/libcgi.tex
+10
-9
No files found.
Doc/lib/libcgi.tex
Dosyayı görüntüle @
a2e268aa
...
...
@@ -20,7 +20,7 @@ written in Python.
A CGI script is invoked by an HTTP server, usually to process user
input submitted through an HTML
\code
{
<FORM>
}
or
\code
{
<ISINPUT>
}
element.
Most often, CGI scripts live in the server's special
\
cod
e
{
cgi-bin
}
Most often, CGI scripts live in the server's special
\
fil
e
{
cgi-bin
}
directory. The HTTP server places all sorts of information about the
request (such as the client's hostname, the requested URL, the query
string, and lots of other goodies) in the script's shell environment,
...
...
@@ -28,7 +28,7 @@ executes the script, and sends the script's output back to the client.
The script's input is connected to the client too, and sometimes the
form data is read this way; at other times the form data is passed via
the ``query string'' part of the URL. This module (
\
cod
e
{
cgi.py
}
) is intended
the ``query string'' part of the URL. This module (
\
fil
e
{
cgi.py
}
) is intended
to take care of the different cases and provide a simpler interface to
the Python script. It also provides a number of utilities that help
in debugging scripts, and the latest addition is support for file
...
...
@@ -260,7 +260,7 @@ alphanumeric characters, dashes, underscores, and periods.
Read the documentation for your HTTP server and check with your local
system administrator to find the directory where CGI scripts should be
installed; usually this is in a directory
\
cod
e
{
cgi-bin
}
in the server tree.
installed; usually this is in a directory
\
fil
e
{
cgi-bin
}
in the server tree.
Make sure that your script is readable and executable by ``others''; the
Unix file mode should be 755 (use
\code
{
chmod 755 filename
}
). Make sure
...
...
@@ -321,10 +321,10 @@ First of all, check for trivial installation errors -- reading the
section above on installing your CGI script carefully can save you a
lot of time. If you wonder whether you have understood the
installation procedure correctly, try installing a copy of this module
file (
\
cod
e
{
cgi.py
}
) as a CGI script. When invoked as a script, the file
file (
\
fil
e
{
cgi.py
}
) as a CGI script. When invoked as a script, the file
will dump its environment and the contents of the form in HTML form.
Give it the right mode etc, and send it a request. If it's installed
in the standard
\
cod
e
{
cgi-bin
}
directory, it should be possible to send it a
in the standard
\
fil
e
{
cgi-bin
}
directory, it should be possible to send it a
request by entering a URL into your browser of the form:
\bcode
\begin{verbatim}
...
...
@@ -337,19 +337,20 @@ gives another error (e.g. 500), there's an installation problem that
you should fix before trying to go any further. If you get a nicely
formatted listing of the environment and form content (in this
example, the fields should be listed as ``addr'' with value ``At Home''
and ``name'' with value ``Joe Blow''), the
\
cod
e
{
cgi.py
}
script has been
and ``name'' with value ``Joe Blow''), the
\
fil
e
{
cgi.py
}
script has been
installed correctly. If you follow the same procedure for your own
script, you should now be able to debug it.
The next step could be to call the
\code
{
cgi
}
module's test() function from
your script: replace its main code with the single statement
The next step could be to call the
\code
{
cgi
}
module's
\code
{
test()
}
function from your script: replace its main code with the single
statement
\bcode
\begin{verbatim}
cgi.test()
\end{verbatim}
\ecode
%
This should produce the same results as those gotten from installing
the
\
cod
e
{
cgi.py
}
file itself.
the
\
fil
e
{
cgi.py
}
file itself.
When an ordinary Python script raises an unhandled exception
(e.g. because of a typo in a module name, a file that can't be opened,
...
...
Doc/libcgi.tex
Dosyayı görüntüle @
a2e268aa
...
...
@@ -20,7 +20,7 @@ written in Python.
A CGI script is invoked by an HTTP server, usually to process user
input submitted through an HTML
\code
{
<FORM>
}
or
\code
{
<ISINPUT>
}
element.
Most often, CGI scripts live in the server's special
\
cod
e
{
cgi-bin
}
Most often, CGI scripts live in the server's special
\
fil
e
{
cgi-bin
}
directory. The HTTP server places all sorts of information about the
request (such as the client's hostname, the requested URL, the query
string, and lots of other goodies) in the script's shell environment,
...
...
@@ -28,7 +28,7 @@ executes the script, and sends the script's output back to the client.
The script's input is connected to the client too, and sometimes the
form data is read this way; at other times the form data is passed via
the ``query string'' part of the URL. This module (
\
cod
e
{
cgi.py
}
) is intended
the ``query string'' part of the URL. This module (
\
fil
e
{
cgi.py
}
) is intended
to take care of the different cases and provide a simpler interface to
the Python script. It also provides a number of utilities that help
in debugging scripts, and the latest addition is support for file
...
...
@@ -260,7 +260,7 @@ alphanumeric characters, dashes, underscores, and periods.
Read the documentation for your HTTP server and check with your local
system administrator to find the directory where CGI scripts should be
installed; usually this is in a directory
\
cod
e
{
cgi-bin
}
in the server tree.
installed; usually this is in a directory
\
fil
e
{
cgi-bin
}
in the server tree.
Make sure that your script is readable and executable by ``others''; the
Unix file mode should be 755 (use
\code
{
chmod 755 filename
}
). Make sure
...
...
@@ -321,10 +321,10 @@ First of all, check for trivial installation errors -- reading the
section above on installing your CGI script carefully can save you a
lot of time. If you wonder whether you have understood the
installation procedure correctly, try installing a copy of this module
file (
\
cod
e
{
cgi.py
}
) as a CGI script. When invoked as a script, the file
file (
\
fil
e
{
cgi.py
}
) as a CGI script. When invoked as a script, the file
will dump its environment and the contents of the form in HTML form.
Give it the right mode etc, and send it a request. If it's installed
in the standard
\
cod
e
{
cgi-bin
}
directory, it should be possible to send it a
in the standard
\
fil
e
{
cgi-bin
}
directory, it should be possible to send it a
request by entering a URL into your browser of the form:
\bcode
\begin{verbatim}
...
...
@@ -337,19 +337,20 @@ gives another error (e.g. 500), there's an installation problem that
you should fix before trying to go any further. If you get a nicely
formatted listing of the environment and form content (in this
example, the fields should be listed as ``addr'' with value ``At Home''
and ``name'' with value ``Joe Blow''), the
\
cod
e
{
cgi.py
}
script has been
and ``name'' with value ``Joe Blow''), the
\
fil
e
{
cgi.py
}
script has been
installed correctly. If you follow the same procedure for your own
script, you should now be able to debug it.
The next step could be to call the
\code
{
cgi
}
module's test() function from
your script: replace its main code with the single statement
The next step could be to call the
\code
{
cgi
}
module's
\code
{
test()
}
function from your script: replace its main code with the single
statement
\bcode
\begin{verbatim}
cgi.test()
\end{verbatim}
\ecode
%
This should produce the same results as those gotten from installing
the
\
cod
e
{
cgi.py
}
file itself.
the
\
fil
e
{
cgi.py
}
file itself.
When an ordinary Python script raises an unhandled exception
(e.g. because of a typo in a module name, a file that can't be opened,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment