PHP命令行参数详解及应用
大家知道,php是一种PHP是一个基于服务端来创建动态网站的脚本语言,您可以用PHP和HTML生成网站主页。当用户打开php页面时,服务端便执行PHP的命令并将执行结果发送至用户的浏览器中,这类似于ASP和CoildFusion,PHP可以运行在WINDOWS和多种版本的UNIX上。除了能够操作您的页面外,PHP还能发送HTTP的标题。您可以设置cookie,治理数字签名和重定向用户,而且它提供了极好的连通性到其它数据库(还有ODBC),集成各种外部库来做用PDF文档解析XML的任何事情。那你还知道可以用php的强大功能做点别的东西吗?
在以独立的cgi方式运行时,需要一个php可执行程序,他有很多命令行参数的,有些可以用作很好玩的用途,下面是全部的php命令行参数,其中[]表示可有可无的,
用法 php [-q] [-h] [-s] [-v] [-i] [-f ] | { [args...]}
-q 安静模式。不输出HTTP头。
-s 将php程序文件用转化为彩色格式的HTML(比如保留字用绿色,函数和变量为蓝色,注释为黄色而字串则是红色等等。
-f 读入并解释指明的文件。
-c 在中读入php.ini文件
-a 交互式运行
-d foo[=bar] 定义ini中的输入项 foo 的值为 bar
-e 输出额外信息以便调试和性能分析
-z 调入Zend扩展文件
-i php的相关信息
-h help本身。
哈,知道如何利用它了吗?对了:
1.用php -q 文件名.php 方式把php程序当shell程序来用,
2.用 -s把自己的php程序html化。这样是不是很省心?
3.利用php的odbc功能可以在shell命令中对数据库进行操作。
还有很多,就看你的创意了,哦,别忘了告诉我一声。
文章地址:
转载随意^^请带上本文地址!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Windows operating system is one of the most popular operating systems in the world, and its new version Win11 has attracted much attention. In the Win11 system, obtaining administrator rights is an important operation. Administrator rights allow users to perform more operations and settings on the system. This article will introduce in detail how to obtain administrator permissions in Win11 system and how to effectively manage permissions. In the Win11 system, administrator rights are divided into two types: local administrator and domain administrator. A local administrator has full administrative rights to the local computer

Detailed explanation of division operation in OracleSQL In OracleSQL, division operation is a common and important mathematical operation, used to calculate the result of dividing two numbers. Division is often used in database queries, so understanding the division operation and its usage in OracleSQL is one of the essential skills for database developers. This article will discuss the relevant knowledge of division operations in OracleSQL in detail and provide specific code examples for readers' reference. 1. Division operation in OracleSQL

This article details the steps to upgrade Ubuntu 20.04 to 22.04. For users using Ubuntu 20.04, they have missed the new features and advantages brought by version 22.04. In order to get a better experience and security, it is recommended to upgrade to a newer Ubuntu version in time. Ubuntu22.04 is codenamed "Jamie Jellyfish", let's explore how to get the latest LTS version! How to upgrade Ubuntu 20.04 to 22.04 via the command line Mastering the command line will give you an advantage. While it is possible to update Ubuntu via the GUI, our focus will be via the command line. First, let’s check the currently running version of Ubuntu using the following command: $

i9-12900H is a 14-core processor. The architecture and technology used are all new, and the threads are also very high. The overall work is excellent, and some parameters have been improved. It is particularly comprehensive and can bring users Excellent experience. i9-12900H parameter evaluation review: 1. i9-12900H is a 14-core processor, which adopts the q1 architecture and 24576kb process technology, and has been upgraded to 20 threads. 2. The maximum CPU frequency is 1.80! 5.00ghz, which mainly depends on the workload. 3. Compared with the price, it is very suitable. The price-performance ratio is very good, and it is very suitable for some partners who need normal use. i9-12900H parameter evaluation and performance running scores

C++ parameter type safety checking ensures that functions only accept values of expected types through compile-time checks, run-time checks, and static assertions, preventing unexpected behavior and program crashes: Compile-time type checking: The compiler checks type compatibility. Runtime type checking: Use dynamic_cast to check type compatibility, and throw an exception if there is no match. Static assertion: Assert type conditions at compile time.

Start the journey of Django project: start from the command line and create your first Django project. Django is a powerful and flexible web application framework. It is based on Python and provides many tools and functions needed to develop web applications. This article will lead you to create your first Django project starting from the command line. Before starting, make sure you have Python and Django installed. Step 1: Create the project directory First, open the command line window and create a new directory

The modulo operator (%) in PHP is used to obtain the remainder of the division of two numbers. In this article, we will discuss the role and usage of the modulo operator in detail, and provide specific code examples to help readers better understand. 1. The role of the modulo operator In mathematics, when we divide an integer by another integer, we get a quotient and a remainder. For example, when we divide 10 by 3, the quotient is 3 and the remainder is 1. The modulo operator is used to obtain this remainder. 2. Usage of the modulo operator In PHP, use the % symbol to represent the modulus

Detailed explanation of Linux system call system() function System call is a very important part of the Linux operating system. It provides a way to interact with the system kernel. Among them, the system() function is one of the commonly used system call functions. This article will introduce the use of the system() function in detail and provide corresponding code examples. Basic Concepts of System Calls System calls are a way for user programs to interact with the operating system kernel. User programs request the operating system by calling system call functions
