1. Trang chủ
  2. » Công Nghệ Thông Tin

PHP Developer’s Dictionary pps

609 1,7K 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 609
Dung lượng 4,12 MB

Nội dung

[...]... look for the following lines: # And for PHP 4.x, use: # IT-SC book 16 PHP Developer’s Dictionary #AddType application/x-httpd -php php #AddType application/x-httpd -php- source phps Delete the #s from the two AddType lines and save the file This instructs Apache to use the PHP DSO to parse all files ending with the php extension If the file is a PHP source file (.phps), special formatting parameters are... = $argv[0] "; echo "PHP_ SELF = $PHP_ SELF "; phpinfo(); ?> This script reads the variables from the PHP environment and prints them out to the browser Your results should look something like this: IT-SC book 31 PHP Developer’s Dictionary ITEM = 10 Email = robertcox@anywhere.com Name = Robert Cox Preference = Braves argc = 1 argv = ITEM=10 PHP_ SELF = /phpbook/phpinfo .php There should also be... PHP_ SELF HTTP_GET_VARS["ITEM"] HTTP_POST_VARS["name"] HTTP_POST_VARS["email"] IT-SC book Value /phpbook/phpinfo .php 10 Robert Cox robertcox@engage.com 32 PHP Developer’s Dictionary HTTP_POST_VARS["preference"] HTTP_SERVER_VARS[ "PHP_ SELF"] HTTP_SERVER_VARS["argv"] HTTP_SERVER_VARS["argc"] Braves /phpbook/phpinfo .php Array ( [0] => ITEM=10 ) 1 Using the Environment to Generate Content One of the ways that... 172.31.70.107 172.31.70.107 POST /phpbook/phpinfo .php phoenix 80 0 HTTP/1.1 Microsoft-IIS/4.0 There is also a section that is output by the phpinfo() function that displays PHP variables This information differs somewhat from the environment variables detailed in Table 2.2 Refer to Table 2.3 for this information Table 2.3 PHP Variables Displayed by phpinfo() Variable PHP_ SELF HTTP_GET_VARS["ITEM"] HTTP_POST_VARS["name"]... http://phoenix/phpbook /postvars.html HTTP_USER_AGENT HTTP_COOKIE PATH_INFO PATH_TRANSLATED QUERY_STRING REMOTE_ADDR REMOTE_HOST REQUEST_METHOD SCRIPT_NAME SERVER_NAME SERVER_PORT SERVER_PORT_SECURE SERVER_PROTOCOL SERVER_SOFTWARE Mozilla/4.0 (compatible; MSIE 5.01; Windows NT) AAMUILoginName; AAMUILoginPassword; AAMUILoginLocale /phpbook/phpinfo .php c:\ InetPub\ wwwroot\ phpbook \ phpinfo .php ITEM=10... should be C:\ WINNT\ system32\ php4 isapi.dll Apply the IT-SC book 17 PHP Developer’s Dictionary changes and then click the Home Directory tab in the Management Console Click the Configuration button and add a new entry to the application mappings Enter the path to the php4 isapi.dll as the executable Again, this path should be C:\ WINNT\ system32\ php4 isapi.dll Enter php as the extension, and make sure... West 103rd Street Indianapolis, IN 46290 USA IT-SC book 11 PHP Developer’s Dictionary Introduction Welcome to the PHP Developer's Dictionary We hope that you will find this book the most useful PHP reference available today This is truly the type of book that should be open next to your workstation, except for those of you who have obtained expert PHP programming status Even the best of us need to double-check... and a formal debugger PHP 4 also includes better object-oriented syntax, self-contained extensions, and a thread-safe core Advantages of PHP 4 PHP has two main competitors: Microsoft's Active Server Pages and Allaire's ColdFusion PHP has many advantages over these commercial packages As mentioned previously, one of the main advantages PHP has over ASP and ColdFusion is its price PHP is completely free... is as follows: IT-SC book 18 PHP Developer’s Dictionary /configure –with-apxs=/www/bin/apxs –with-pgsql=/usr/include/pgsql –with-mysql=/usr/include/mysql Consider only the options that are needed when using this command If unnecessary options are compiled into PHP, a degradation in performance is likely Configuration File Options Some options in PHP must be compiled into PHP to work, but others are... defined using all capital letters PHP also has some internal constants For instance, the constant FILE returns the name of the file that PHP is currently reading The constant LINE returns the line number of the file These constants are normally used when you are generating error messages Operators and Mathematical Functions IT-SC book 23 PHP Developer’s Dictionary PHP, like types of described operators . following lines: # And for PHP 4.x, use: # PHP Developer’s Dictionary IT-SC book 17 #AddType application/x-httpd -php .php #AddType application/x-httpd -php- source .phps Delete the #s from. description, a version support key, and examples where needed. PHP Developer’s Dictionary IT-SC book 2 PHP Developer’s Dictionary IT-SC book 3 Copyright © 2001 by Sams Publishing All. IN 46290 USA PHP Developer’s Dictionary IT-SC book 12 Introduction Welcome to the PHP Developer's Dictionary . We hope that you will find this book the most useful PHP reference available

Ngày đăng: 13/07/2014, 18:20

TỪ KHÓA LIÊN QUAN