Hướng dẫn php get service status - php nhận trạng thái dịch vụ

This function will return an array containing the above information as a return value, but if this fails it will return an integer which is a System Error Code. All the System Error Codes can be found here:

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx

In my case, it returned 5, in which I immediately knew why and fixed the issue right away.

In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.

Again, it should not return FALSE, instead an System Error Code for Windows.

[Php 4> = 4.1.0, Php 5, Php 7, Php 8]

$ _Server - Thông tin môi trường thực thi và máy chủServer and execution environment information

Sự mô tả

$ _Server là một mảng chứa thông tin như tiêu đề, đường dẫn và vị trí tập lệnh. Các mục trong mảng này được tạo bởi máy chủ web. Không có gì đảm bảo rằng mọi máy chủ web sẽ cung cấp bất kỳ máy chủ nào trong số này; Máy chủ có thể bỏ qua một số, hoặc cung cấp những người khác không được liệt kê ở đây. Điều đó nói rằng, một số lượng lớn các biến này được tính trong đặc tả »& nbsp; CGI/1.1, vì vậy bạn sẽ có thể mong đợi những điều đó.

Chỉ số

Bạn có thể hoặc không thể tìm thấy bất kỳ yếu tố nào sau đây trong $ _Server. Lưu ý rằng rất ít, nếu có, trong số này sẽ có sẵn [hoặc thực sự có bất kỳ ý nghĩa nào] nếu chạy PHP trên dòng lệnh.

'Php_elf' Tên tệp của tập lệnh hiện đang thực hiện, liên quan đến gốc tài liệu. Chẳng hạn, $ _Server ['php_elf'] trong một tập lệnh tại địa chỉ //example.com/foo/bar.php sẽ là /foo/bar.php. Hằng số __file__ chứa đường dẫn và tên tệp đầy đủ của tệp hiện tại [tức là bao gồm]. Nếu PHP đang chạy như một bộ xử lý dòng lệnh này, biến này chứa tên tập lệnh. 'Argv' mảng các đối số được truyền cho tập lệnh. Khi tập lệnh được chạy trên dòng lệnh, điều này cho phép truy cập kiểu C vào các tham số dòng lệnh. Khi được gọi qua phương thức GET, điều này sẽ chứa chuỗi truy vấn. 'ARGC' chứa số lượng tham số dòng lệnh được truyền vào tập lệnh [nếu chạy trên dòng lệnh]. 'Gateway_interface' Bản sửa đổi của đặc tả CGI mà máy chủ đang sử dụng; ví dụ. 'CGI/1.1'. 'Server_addr' địa chỉ IP của máy chủ theo đó tập lệnh hiện tại đang thực hiện. 'Server_name' Tên của máy chủ máy chủ theo đó tập lệnh hiện tại đang thực thi. Nếu tập lệnh đang chạy trên máy chủ ảo, đây sẽ là giá trị được xác định cho máy chủ ảo đó. The filename of the currently executing script, relative to the document root. For instance, $_SERVER['PHP_SELF'] in a script at the address //example.com/foo/bar.php would be /foo/bar.php. The __FILE__ constant contains the full path and filename of the current [i.e. included] file. If PHP is running as a command-line processor this variable contains the script name. 'argv' Array of arguments passed to the script. When the script is run on the command line, this gives C-style access to the command line parameters. When called via the GET method, this will contain the query string. 'argc' Contains the number of command line parameters passed to the script [if run on the command line]. 'GATEWAY_INTERFACE' What revision of the CGI specification the server is using; e.g. 'CGI/1.1'. 'SERVER_ADDR' The IP address of the server under which the current script is executing. 'SERVER_NAME' The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host.

Lưu ý: Theo Apache 2, bạn phải đặt UseCanonicalName = OnServerName. Mặt khác, giá trị này phản ánh tên máy chủ do khách hàng cung cấp, có thể bị giả mạo. Không an toàn khi dựa vào giá trị này trong bối cảnh phụ thuộc bảo mật.: Under Apache 2, you must set UseCanonicalName = On and ServerName. Otherwise, this value reflects the hostname supplied by the client, which can be spoofed. It is not safe to rely on this value in security-dependent contexts.

Chuỗi nhận dạng máy chủ 'server_software', được đưa ra trong các tiêu đề khi trả lời các yêu cầu. Tên 'server_protocol' và sửa đổi giao thức thông tin thông qua đó trang được yêu cầu; ví dụ. '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx0'; 'Request_method' phương thức yêu cầu nào được sử dụng để truy cập trang; ví dụ. '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx1', '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx2', '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx3', '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx4'. Server identification string, given in the headers when responding to requests. 'SERVER_PROTOCOL' Name and revision of the information protocol via which the page was requested; e.g. '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx0'; 'REQUEST_METHOD' Which request method was used to access the page; e.g. '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx1', '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx2', '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx3', '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx4'.

Ghi chú::

Tập lệnh PHP bị chấm dứt sau khi gửi các tiêu đề [điều đó có nghĩa là sau khi tạo bất kỳ đầu ra nào mà không có bộ đệm đầu ra] nếu phương thức yêu cầu là //msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx2.

'Request_time' dấu thời gian bắt đầu yêu cầu. 'Request_time_float' dấu thời gian bắt đầu yêu cầu, với độ chính xác microsecond. 'Query_String' chuỗi truy vấn, nếu có, thông qua đó trang được truy cập. 'Document_root' thư mục gốc tài liệu theo đó tập lệnh hiện tại đang thực thi, như được định nghĩa trong tệp cấu hình của máy chủ. 'Http_accept' nội dung của tiêu đề //msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx6 từ yêu cầu hiện tại, nếu có. 'Http_accept_charset' nội dung của tiêu đề //msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx7 từ yêu cầu hiện tại, nếu có. Ví dụ: '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx8'. 'Http_accept_encoding' nội dung của tiêu đề //msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx9 từ yêu cầu hiện tại, nếu có. Ví dụ: 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.0'. 'Http_accept_langage' nội dung của tiêu đề In my case, it returned 5, in which I immediately knew why and fixed the issue right away.1 từ yêu cầu hiện tại, nếu có. Ví dụ: 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.2'. 'HTTP_Connection' nội dung của tiêu đề In my case, it returned 5, in which I immediately knew why and fixed the issue right away.3 từ yêu cầu hiện tại, nếu có. Ví dụ: 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.4'. 'Http_host' nội dung của tiêu đề In my case, it returned 5, in which I immediately knew why and fixed the issue right away.5 từ yêu cầu hiện tại, nếu có. 'Http_referer' địa chỉ của trang [nếu có] giới thiệu tác nhân người dùng đến trang hiện tại. Điều này được đặt bởi tác nhân người dùng. Không phải tất cả các đại lý người dùng sẽ đặt điều này và một số cung cấp khả năng sửa đổi http_referer làm tính năng. Nói tóm lại, nó không thể thực sự được tin tưởng. 'Http_user_agent' nội dung của tiêu đề In my case, it returned 5, in which I immediately knew why and fixed the issue right away.6 từ yêu cầu hiện tại, nếu có. Đây là một chuỗi biểu thị tác nhân người dùng đang truy cập trang. Một ví dụ điển hình là: mozilla/4.5 [en] [x11; u; linux 2.2.9 i586]. Trong số những thứ khác, bạn có thể sử dụng giá trị này với get_browser [] để điều chỉnh đầu ra của trang của bạn theo khả năng của tác nhân người dùng. 'HTTPS' được đặt thành giá trị không trống nếu tập lệnh được truy vấn thông qua giao thức HTTPS. 'Remote_addr' địa chỉ IP mà người dùng đang xem trang hiện tại. 'Remote_host' Tên máy chủ mà người dùng đang xem trang hiện tại. Tra cứu DNS ngược dựa trên Remote_addr của người dùng. The timestamp of the start of the request. 'REQUEST_TIME_FLOAT' The timestamp of the start of the request, with microsecond precision. 'QUERY_STRING' The query string, if any, via which the page was accessed. 'DOCUMENT_ROOT' The document root directory under which the current script is executing, as defined in the server's configuration file. 'HTTP_ACCEPT' Contents of the //msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx6 header from the current request, if there is one. 'HTTP_ACCEPT_CHARSET' Contents of the //msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx7 header from the current request, if there is one. Example: '//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx8'. 'HTTP_ACCEPT_ENCODING' Contents of the //msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx9 header from the current request, if there is one. Example: 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.0'. 'HTTP_ACCEPT_LANGUAGE' Contents of the In my case, it returned 5, in which I immediately knew why and fixed the issue right away.1 header from the current request, if there is one. Example: 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.2'. 'HTTP_CONNECTION' Contents of the In my case, it returned 5, in which I immediately knew why and fixed the issue right away.3 header from the current request, if there is one. Example: 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.4'. 'HTTP_HOST' Contents of the In my case, it returned 5, in which I immediately knew why and fixed the issue right away.5 header from the current request, if there is one. 'HTTP_REFERER' The address of the page [if any] which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. 'HTTP_USER_AGENT' Contents of the In my case, it returned 5, in which I immediately knew why and fixed the issue right away.6 header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] [X11; U; Linux 2.2.9 i586]. Among other things, you can use this value with get_browser[] to tailor your page's output to the capabilities of the user agent. 'HTTPS' Set to a non-empty value if the script was queried through the HTTPS protocol. 'REMOTE_ADDR' The IP address from which the user is viewing the current page. 'REMOTE_HOST' The Host name from which the user is viewing the current page. The reverse dns lookup is based on the REMOTE_ADDR of the user.

Lưu ý: Máy chủ web của bạn phải được cấu hình để tạo biến này. Ví dụ: trong Apache, bạn sẽ cần In my case, it returned 5, in which I immediately knew why and fixed the issue right away.7 bên trong httpd.conf để nó tồn tại. Xem thêm Gethostbyaddr [].: Your web server must be configured to create this variable. For example in Apache you'll need In my case, it returned 5, in which I immediately knew why and fixed the issue right away.7 inside httpd.conf for it to exist. See also gethostbyaddr[].

'Remote_port' cổng đang được sử dụng trên máy của người dùng để liên lạc với máy chủ web. 'Remote_user' người dùng được xác thực. 'Redirect_Remote_user' Người dùng được xác thực nếu yêu cầu được chuyển hướng nội bộ. 'Script_filename' The port being used on the user's machine to communicate with the web server. 'REMOTE_USER' The authenticated user. 'REDIRECT_REMOTE_USER' The authenticated user if the request is internally redirected. 'SCRIPT_FILENAME'

Tên đường dẫn tuyệt đối của tập lệnh hiện đang thực thi.

Ghi chú::

Nếu một tập lệnh được thực thi với CLI, dưới dạng đường dẫn tương đối, chẳng hạn như file.php hoặc ../file.php, $ _server ['script_filename'] sẽ chứa đường dẫn tương đối được chỉ định bởi người dùng.

'Server_admin' Giá trị được cung cấp cho lệnh server_admin [cho apache] trong tệp cấu hình máy chủ web. Nếu tập lệnh đang chạy trên máy chủ ảo, đây sẽ là giá trị được xác định cho máy chủ ảo đó. 'Server_port' cổng trên máy chủ đang được máy chủ web sử dụng để liên lạc. Đối với các thiết lập mặc định, đây sẽ là 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.8'; Ví dụ, sử dụng SSL sẽ thay đổi điều này thành bất cứ điều gì mà cổng HTTP an toàn đã xác định của bạn. The value given to the SERVER_ADMIN [for Apache] directive in the web server configuration file. If the script is running on a virtual host, this will be the value defined for that virtual host. 'SERVER_PORT' The port on the server machine being used by the web server for communication. For default setups, this will be 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.8'; using SSL, for instance, will change this to whatever your defined secure HTTP port is.

Lưu ý: Theo Apache 2, bạn phải đặt UseCanonicalName = On, cũng như In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:0 để có được cổng vật lý [thực], nếu không, giá trị này có thể bị giả mạo và nó có thể hoặc không thể trả về giá trị cổng vật lý. Không an toàn khi dựa vào giá trị này trong bối cảnh phụ thuộc bảo mật.: Under the Apache 2, you must set UseCanonicalName = On, as well as In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:0 in order to get the physical [real] port, otherwise, this value can be spoofed and it may or may not return the physical port value. It is not safe to rely on this value in security-dependent contexts.

Chuỗi 'server_signature' chứa phiên bản máy chủ và tên máy chủ ảo được thêm vào các trang do máy chủ tạo, nếu được bật. Hệ thống tập tin 'path_translated' [không phải là đường dẫn dựa trên root-] dựa trên tập lệnh hiện tại, sau khi máy chủ đã thực hiện bất kỳ ánh xạ ảo đến thực tế nào. String containing the server version and virtual host name which are added to server-generated pages, if enabled. 'PATH_TRANSLATED' Filesystem- [not document root-] based path to the current script, after the server has done any virtual-to-real mapping.

Lưu ý: Người dùng Apache 2 có thể sử dụng In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:1 bên trong httpd.conf để xác định path_info.: Apache 2 users may use In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:1 inside httpd.conf to define PATH_INFO.

'Script_name' chứa đường dẫn của tập lệnh hiện tại. Điều này rất hữu ích cho các trang cần phải chỉ vào chính mình. Hằng số __file__ chứa đường dẫn và tên tệp đầy đủ của tệp hiện tại [tức là bao gồm]. 'Request_uri' URI được đưa ra để truy cập trang này; Ví dụ, 'In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:2'. 'PHP_AUTH_DIGEST' Khi thực hiện xác thực HTTP Digest HTTP này được đặt thành tiêu đề 'ủy quyền' được gửi bởi máy khách [sau đó bạn nên sử dụng để thực hiện xác thực phù hợp]. 'PHP_AUTH_USER' Khi thực hiện xác thực HTTP, biến này được đặt thành tên người dùng do người dùng cung cấp. 'PHP_AUTH_PW' Khi thực hiện xác thực HTTP, biến này được đặt thành mật khẩu do người dùng cung cấp. 'Auth_Type' Khi thực hiện xác thực HTTP Biến này được đặt thành loại xác thực. 'PATH_INFO' chứa bất kỳ thông tin đường dẫn do khách hàng cung cấp theo tên tệp tập lệnh thực tế nhưng trước chuỗi truy vấn, nếu có. Chẳng hạn, nếu tập lệnh hiện tại được truy cập thông qua URL //www.example.com/php/path_info.php/some/stuff?foo=bar, thì $ _server ['path_info'] sẽ chứa In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:3. 'Orig_path_info' phiên bản gốc của 'path_info' trước khi được xử lý bởi PHP. Contains the current script's path. This is useful for pages which need to point to themselves. The __FILE__ constant contains the full path and filename of the current [i.e. included] file. 'REQUEST_URI' The URI which was given in order to access this page; for instance, 'In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:2'. 'PHP_AUTH_DIGEST' When doing Digest HTTP authentication this variable is set to the 'Authorization' header sent by the client [which you should then use to make the appropriate validation]. 'PHP_AUTH_USER' When doing HTTP authentication this variable is set to the username provided by the user. 'PHP_AUTH_PW' When doing HTTP authentication this variable is set to the password provided by the user. 'AUTH_TYPE' When doing HTTP authentication this variable is set to the authentication type. 'PATH_INFO' Contains any client-provided pathname information trailing the actual script filename but preceding the query string, if available. For instance, if the current script was accessed via the URL //www.example.com/php/path_info.php/some/stuff?foo=bar, then $_SERVER['PATH_INFO'] would contain In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:3. 'ORIG_PATH_INFO' Original version of 'PATH_INFO' before processed by PHP.

Ví dụ

Ví dụ #1 $ _Server Ví dụ

In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:4

Ví dụ trên sẽ xuất ra một cái gì đó tương tự như:

Ghi chú

Ghi chú::

Nếu một tập lệnh được thực thi với CLI, dưới dạng đường dẫn tương đối, chẳng hạn như file.php hoặc ../file.php, $ _server ['script_filename'] sẽ chứa đường dẫn tương đối được chỉ định bởi người dùng.global $variable; to access it within functions or methods.

'Server_admin' Giá trị được cung cấp cho lệnh server_admin [cho apache] trong tệp cấu hình máy chủ web. Nếu tập lệnh đang chạy trên máy chủ ảo, đây sẽ là giá trị được xác định cho máy chủ ảo đó. 'Server_port' cổng trên máy chủ đang được máy chủ web sử dụng để liên lạc. Đối với các thiết lập mặc định, đây sẽ là 'In my case, it returned 5, in which I immediately knew why and fixed the issue right away.8'; Ví dụ, sử dụng SSL sẽ thay đổi điều này thành bất cứ điều gì mà cổng HTTP an toàn đã xác định của bạn.

Lưu ý: Theo Apache 2, bạn phải đặt UseCanonicalName = On, cũng như In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:0 để có được cổng vật lý [thực], nếu không, giá trị này có thể bị giả mạo và nó có thể hoặc không thể trả về giá trị cổng vật lý. Không an toàn khi dựa vào giá trị này trong bối cảnh phụ thuộc bảo mật.

In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:5

In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:6

In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:7

In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:8

In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:9

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.
0

Chuỗi 'server_signature' chứa phiên bản máy chủ và tên máy chủ ảo được thêm vào các trang do máy chủ tạo, nếu được bật. Hệ thống tập tin 'path_translated' [không phải là đường dẫn dựa trên root-] dựa trên tập lệnh hiện tại, sau khi máy chủ đã thực hiện bất kỳ ánh xạ ảo đến thực tế nào.

Lưu ý: Người dùng Apache 2 có thể sử dụng In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:1 bên trong httpd.conf để xác định path_info.

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.
2

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.
3

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.
4

'Script_name' chứa đường dẫn của tập lệnh hiện tại. Điều này rất hữu ích cho các trang cần phải chỉ vào chính mình. Hằng số __file__ chứa đường dẫn và tên tệp đầy đủ của tệp hiện tại [tức là bao gồm]. 'Request_uri' URI được đưa ra để truy cập trang này; Ví dụ, 'In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:2'. 'PHP_AUTH_DIGEST' Khi thực hiện xác thực HTTP Digest HTTP này được đặt thành tiêu đề 'ủy quyền' được gửi bởi máy khách [sau đó bạn nên sử dụng để thực hiện xác thực phù hợp]. 'PHP_AUTH_USER' Khi thực hiện xác thực HTTP, biến này được đặt thành tên người dùng do người dùng cung cấp. 'PHP_AUTH_PW' Khi thực hiện xác thực HTTP, biến này được đặt thành mật khẩu do người dùng cung cấp. 'Auth_Type' Khi thực hiện xác thực HTTP Biến này được đặt thành loại xác thực. 'PATH_INFO' chứa bất kỳ thông tin đường dẫn do khách hàng cung cấp theo tên tệp tập lệnh thực tế nhưng trước chuỗi truy vấn, nếu có. Chẳng hạn, nếu tập lệnh hiện tại được truy cập thông qua URL //www.example.com/php/path_info.php/some/stuff?foo=bar, thì $ _server ['path_info'] sẽ chứa In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:3. 'Orig_path_info' phiên bản gốc của 'path_info' trước khi được xử lý bởi PHP.

Ví dụ

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.
6

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.
7

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.
8

ERROR_SERVICE_DOES_NOT_EXIST
1060 [0x424]
The specified service does not exist as an installed service.
9

Again, it should not return FALSE, instead an System Error Code for Windows.0

Again, it should not return FALSE, instead an System Error Code for Windows.1

Again, it should not return FALSE, instead an System Error Code for Windows.2

Again, it should not return FALSE, instead an System Error Code for Windows.3

Again, it should not return FALSE, instead an System Error Code for Windows.4

Again, it should not return FALSE, instead an System Error Code for Windows.5

Again, it should not return FALSE, instead an System Error Code for Windows.6

Again, it should not return FALSE, instead an System Error Code for Windows.7

Ví dụ #1 $ _Server Ví dụ

Lưu ý: Theo Apache 2, bạn phải đặt UseCanonicalName = On, cũng như In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:0 để có được cổng vật lý [thực], nếu không, giá trị này có thể bị giả mạo và nó có thể hoặc không thể trả về giá trị cổng vật lý. Không an toàn khi dựa vào giá trị này trong bối cảnh phụ thuộc bảo mật.

Again, it should not return FALSE, instead an System Error Code for Windows.9

0

Chuỗi 'server_signature' chứa phiên bản máy chủ và tên máy chủ ảo được thêm vào các trang do máy chủ tạo, nếu được bật. Hệ thống tập tin 'path_translated' [không phải là đường dẫn dựa trên root-] dựa trên tập lệnh hiện tại, sau khi máy chủ đã thực hiện bất kỳ ánh xạ ảo đến thực tế nào.

Lưu ý: Người dùng Apache 2 có thể sử dụng In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:1 bên trong httpd.conf để xác định path_info.

2

3

'Script_name' chứa đường dẫn của tập lệnh hiện tại. Điều này rất hữu ích cho các trang cần phải chỉ vào chính mình. Hằng số __file__ chứa đường dẫn và tên tệp đầy đủ của tệp hiện tại [tức là bao gồm]. 'Request_uri' URI được đưa ra để truy cập trang này; Ví dụ, 'In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:2'. 'PHP_AUTH_DIGEST' Khi thực hiện xác thực HTTP Digest HTTP này được đặt thành tiêu đề 'ủy quyền' được gửi bởi máy khách [sau đó bạn nên sử dụng để thực hiện xác thực phù hợp]. 'PHP_AUTH_USER' Khi thực hiện xác thực HTTP, biến này được đặt thành tên người dùng do người dùng cung cấp. 'PHP_AUTH_PW' Khi thực hiện xác thực HTTP, biến này được đặt thành mật khẩu do người dùng cung cấp. 'Auth_Type' Khi thực hiện xác thực HTTP Biến này được đặt thành loại xác thực. 'PATH_INFO' chứa bất kỳ thông tin đường dẫn do khách hàng cung cấp theo tên tệp tập lệnh thực tế nhưng trước chuỗi truy vấn, nếu có. Chẳng hạn, nếu tập lệnh hiện tại được truy cập thông qua URL //www.example.com/php/path_info.php/some/stuff?foo=bar, thì $ _server ['path_info'] sẽ chứa In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:3. 'Orig_path_info' phiên bản gốc của 'path_info' trước khi được xử lý bởi PHP.

Ví dụ

5

6

7

8

9

Ví dụ #1 $ _Server Ví dụ

Ví dụ

CGI/1.11

CGI/1.12

CGI/1.13

CGI/1.14

CGI/1.15

CGI/1.16

CGI/1.17

CGI/1.18

Ví dụ #1 $ _Server Ví dụ

Lưu ý: Theo Apache 2, bạn phải đặt UseCanonicalName = On, cũng như In the case of mnemotronic at netscape dot net, here in the documentation notes, it returned 1060 which is:0 để có được cổng vật lý [thực], nếu không, giá trị này có thể bị giả mạo và nó có thể hoặc không thể trả về giá trị cổng vật lý. Không an toàn khi dựa vào giá trị này trong bối cảnh phụ thuộc bảo mật.

UseCanonicalName = On0

UseCanonicalName = On1

UseCanonicalName = On2

UseCanonicalName = On3

UseCanonicalName = On4

Ví dụ #1 $ _Server Ví dụ

Ví dụ

UseCanonicalName = On6

UseCanonicalName = On7

UseCanonicalName = On8

UseCanonicalName = On9

ServerName0

ServerName1

CGI/1.17

Ví dụ #1 $ _Server Ví dụ

Ví dụ trên sẽ xuất ra một cái gì đó tương tự như:

ServerName4

ServerName5

ServerName6

Ghi chú

Đây là một 'Superglobal', hoặc biến toàn cầu, tự động. Điều này đơn giản có nghĩa là nó có sẵn trong tất cả các phạm vi trong suốt một kịch bản. Không cần phải thực hiện biến $ toàn cầu; để truy cập nó trong các chức năng hoặc phương pháp.

ServerName8

ServerName9

Vladimir Kornea ¶

13 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx01

Vcoletti tại Tiscali Dot it ¶

Ví dụ

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx02

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx03

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx04

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx05

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx06

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx07

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx08

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx09

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx10

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx11

Steve tại Sc-Fa Dot Com ¶

13 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx13

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx14

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx15

Mark Simon ¶

3 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx17

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx18

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx19

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx20

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx21

Richard York ¶

13 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx23

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx24

Mark Simon ¶

3 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx26

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx27

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx28

Richard York ¶

Stefano [Thông tin tại Sarchittu Dot Org] ¶

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx30

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx31

11 năm trước

Danieltahar ¶

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx33

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx34

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx35

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx36

2 năm trước

Chris at Ocproducts Dot Com ¶

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx38

5 năm trước

3 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx39

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx40

Richard York ¶

13 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx42

Stefano [Thông tin tại Sarchittu Dot Org] ¶

13 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx43

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx44

11 năm trước

Danieltahar ¶

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx46

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx47

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx48

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx49

2 năm trước

Danieltahar ¶

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx51

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx52

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx53

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx54

2 năm trước

13 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx56

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx57

Chris at Ocproducts Dot Com ¶

5 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx59

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx60

Tom ¶

3 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx62

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx63

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx64

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx65

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx66

Richard York ¶

Stefano [Thông tin tại Sarchittu Dot Org] ¶

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx68

11 năm trước

5 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx69

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx70

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx71

Tom ¶

13 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx73

10 năm trước

5 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx74

Tom ¶

10 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx75

picov tại e-link dot nó ¶

Stefano [Thông tin tại Sarchittu Dot Org] ¶

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx76

11 năm trước

Danieltahar ¶

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx77

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx78

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx79

2 năm trước

13 năm trước

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx80

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx81

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx82

//msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx83

Bài Viết Liên Quan

Chủ Đề