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

Secure PHP Development- P118 ppt

5 58 0
Tài liệu đã được kiểm tra trùng lặp

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Secure PHP Development
Trường học Standard University
Chuyên ngành Computer Science
Thể loại Thesis
Năm xuất bản 2003
Thành phố City Name
Định dạng
Số trang 5
Dung lượng 110,37 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Using PHP for Sysadmin TasksCHAPTER 16 Command-Line PHP Utilities CHAPTER 17 Apache Virtual Host Maker CHAPTER 18 BIND Domain Manager Part IV... Chapter 16Command-Line PHP Utilities IN

Trang 2

Using PHP for Sysadmin Tasks

CHAPTER 16

Command-Line PHP Utilities

CHAPTER 17

Apache Virtual Host Maker

CHAPTER 18

BIND Domain Manager

Part IV

Trang 4

Chapter 16

Command-Line PHP Utilities

IN THIS CHAPTER

◆ Writing command-line PHP utilities

◆ How to create a cron-based reminder

◆ How to develop a geographic location query tool for IP

◆ Developing a spam-busting utility for POP3 mailboxes

◆ How to develop a hard disk monitoring tool

◆ Creating a CPU load monitoring tool

PHP STARTED OUT AS A SIMPLEWeb scripting tool written in Perl and later became the most popular Web application development language Because of its strong ties with the Web, it has lagged behind as an all-purpose programming language

Especially for command-line users, PHP is considered a newcomer, because not many command-line PHP utilities are floating around on the Internet just yet In this chapter, you develop a few command-line utilities to get you started in command-line PHP development

Most of the scripts discussed here might not work on a Windows platform.

They have been tested on the Linux platform only.

559

Trang 5

Working with the Command-Line Interpreter

The command-line version of PHP is installed when you enable CGI support during the PHP installation process The command-line PHP interpreter can be found by running the following:

which php

This will show the full path of the PHP command-line interpreter Sample output appears as follows:

/usr/bin/php

In most cases, you should find the PHP binary in the /usr/bin directory, which is typically in your path, so you can run the following:

php -h

The 4.3.x version of the PHP command-line interpreter will display output simi-lar to following:

Usage: php [options] [-f] <file> [args ]

php [options] -r <code> [args ]

php [options] [ args ]

-s Display color syntax highlighted source.

-w Display source with stripped comments and whitespace.

-f <file> Parse <file>.

-v Version number -c <path>|<file> Look for php.ini file in this directory -a Run interactively

-d foo[=bar] Define INI entry foo with value ‘bar’

-e Generate extended information for debugger/profiler

-z <file> Load Zend extension <file>.

-l Syntax check only (lint) -m Show compiled in modules -i PHP information

-r <code> Run PHP <code> without using script tags <? ?> -h This help

args Arguments passed to script Use args when first argument

starts with - or script is read from stdin

560 Part IV: Using PHP for Sysadmin Tasks

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