B、F、B、M、b00m是什么意思思

php命令行用法简介 - Just Code - ITeye技术网站
博客分类:
Php是一个非常流行的web服务端脚本语言。其实,php不仅仅可以在web服务器中充当重要角色。在命令行一样可以执行。
本文中,笔者为各位介绍下php在命令行中的使用方法。
查看php的版本、配置
在命令行中输入php –v 即可查看当前php的版本。
PHP 5.2.17(cli) (built: Feb
Copyright (c)
The PHP Group
Zend Engine v2.2.0, Copyright (c)
Zend Technologies
with Zend Optimizer v3.3.9, Copyright (c) , by Zend Technologies
with eAccelerator v0.9.6.1, Copyright (c)
eAccelerator, by eAccelerator
其他的选项有: –m、-i。笔者在这里就不给出列子了。
-m 会显示当前php加载的有效模块。
-i 则输出无html格式的phpinfo。
使用 –ini 选项可以输出当前php加载ini配置文件的数量、路径信息。
在命令行中运行php程序
从命令行运行php非常简单。但有些注意事项需要各位了解下。诸如$_SESSION之类的服务器变量是无法在命令行中使用的,其他代码的运行则和web服务器中完全一样^_^。
echo “运行php命令行echo”;
把上面的代码另存为hello.php 。在命令行中敲入 php –f hello.php。显示结果如下:
在命令行中执行php文件的好处之一就是可以通过脚本实现一些计划任务的执行。而毋须通过web服务器^_^。
当然,我们也可以直接在php中调试代码:输入php –r 指令,会出现一个”&”符号。这表示已经进入到php的shell中,可以直接写代码,并执行。
-bash-3.2$ php -r '
& for($i=0;$i&2;$i++){
& echo "Number: {$i}\n";
还可以使用php –a 命令打开交互模式,输入一行代码,php会实时输出结果。
检测php语法、高亮输出
不用执行代码,我们可以在命令行下检测php文件的语法错误。
-bash-3.2$ php -l hello.php
No syntax errors detected in hello.php
程序员经常会需要将php代码高亮原样输出,使用php –s 即可
-bash-3.2$ php -s hello.php
&code&&span style="color: #000000"&
&span style="color: #0000BB"&&?php&br /&&/span&
&span style="color: #007700"&echo&&/span&
&span style="color: #DD0000"&'ddd'&/span&
&span style="color: #007700"&;&br /&&/span&&span
style="color: #0000BB"&?&&br /&&/span&
在浏览器中的显示效果
4、查看php手册
从php5.1.2开始,程序员们可以在php命令行下查看手册了,输入php –rf function。会打印出该函数的语法简介
-bash-3.2$ php --rf strip_tags
Function [ &internal:standard& function strip_tags ] {
- Parameters [2] {
Parameter #0 [ &required& $str ]
Parameter #1 [ &optional& $allowable_tags ]
如果要查看类使用 –rc;查看扩展使用 –re。
Php命令行的使用方法介绍到这里就结束了。Enjoy It!
php - Unix, Linux Command
php - PHP Command Line Interface ’CLI’
php [options] [ -f ] file [[--] args...]
php [options] -r code [[--] args...]
php [options] [-B code] -R code [-E code] [[--] args...]
php [options] [-B code] -F file [-E code] [[--] args...]
php [options] -- [ args...]
php [options] -a
DESCRIPTION
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This is the command line interface that enables you to do the following:
You can parse and execute files by using parameter -f followed by the name of the file to be executed.
Using parameter -r you can directly execute PHP code simply as you would do inside a .php file when using the eval() function.
It is also possible to process the standard input line by line using either the parameter -R or -F. In this mode each separate input line causes the code specified by -R or the file specified by -F to be executed. You can access the input line by $argn. While processing the input lines $argi contains the number of the actual line being processed. Further more the parameters -B and -E can be used to execute code (see -r) before and after all input lines have been processed respectively. Notice that the input is read from STDIN and therefore reading from STDIN explicitly changes the next input line or skips input lines.
If none of -r -f -B -R -F or -E is present but a single parameter is given then this parameter is taken as the filename to parse and execute (same as with -f). If no parameter is present then the standard input is read and executed.
Description
--interactive -a
Run PHP interactively. This lets you enter snippets of PHP code that directly get executed. When readline support is enabled you can edit the lines and also have history support.
--bindpath address:port|port -b address:port|port
Bind Path for external FASTCGI Server mode (CGI only).
--no-chdir -C
Do not chdir to the script’s directory (CGI only).
--no-header -q
Quiet-mode. Suppress HTTP header output (CGI only).
--timing count -T count
Measure execution time of script repeated count times (CGI only).
--php-ini path|file -c path|file
Look for php.ini file in the directory path or use the specified file
--no-php-ini -n
No php.ini file will be used
--define foo[=bar] -d foo[=bar]
Define INI entry foo with value bar
Generate extended information for debugger/profiler
--file file -f file
Parse and execute file
--global name -g name
Make variable name global in script.
--hide-args -H
Hide script name (file) and parameters (args...) from external tools. For example you may want to use this when a php script is started as a daemon and the command line contains sensitive data such as passwords.
PHP information and configuration
--syntax-check -l
Syntax check only (lint)
--modules -m
Show compiled in modules
--run code -r code
Run PHP code without using script tags ’&?..?&’
--process-begin code -B code
Run PHP code before processing input lines
--process-code code -R code
Run PHP code for every input line
--process-file file -F file
Parse and execute file for every input line
--process-end code -E code
Run PHP code after processing all input lines
--syntax-highlight -s
Output HTML syntax highlighted source
--version -v
Version number
--stripped -w
Output source with stripped comments and whitespace
--zend-extension file -z file
Load Zend extension file
Arguments passed to script. Use ’--’ args when first argument starts with ’-’ or script is read from stdin
--rfunction
name Shows information about function name
name Shows information about class name
--rextension
name Shows information about extension name
--rextinfo
name Shows configuration for extension name
Show configuration file names
Description
php-cli.ini
The configuration file for the CLI version of PHP.
The standard configuration file will only be used when php-cli.ini cannot be found.
Description
php -r ’echo "Hello World\n";’
This command simply writes the text "Hello World" to standard out.
php -r ’print_r(gd_info());’
This shows the configuration of your gd extension. You can use this to easily check which image formats you can use. If you have any dynamic modules you may want to use the same ini file that php uses when executed from your webserver. There are more extensions which have such a function. For dba use: php -r ’print_r(dba_handlers(1));’
php -R ’echo strip_tags($argn)."\n";’
This PHP command strips off the HTML tags line by line and outputs the result. To see how it works you can first look at the following PHP command 'php -d html_errors=1 -i' which uses PHP to output HTML formatted configuration information. If you then combine those two 'php ...|php ...' you’ll see what happens.
php -E ’echo "Lines: $argi\n";’
Using this PHP command you can count the lines being input.
php -R ’@$l+=count(file($argn));’ -E ’echo "Lines:$l\n";’
In this example PHP expects each input line being a file. It counts all lines of the files specified by each input line and shows the summarized result. You may combine this with tools like find and change the php scriptlet.
php -R ’echo "$argn\n"; fgets(STDIN);’
Since you have access to STDIN from within -B -R -F and -E you can skip certain input lines with your code. But note that in such cases $argi only counts the lines being processed by php itself. Having read this you will guess what the above program does: skipping every second input line.
You can use a shebang line to automatically invoke php from scripts. Only the CLI version of PHP will ignore such a first line as shown below:
#!/bin/php
// your script
You can view the list of known bugs or report any new bug you found at:
The PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski.
Additional work for the CLI sapi was done by Edin Kadribasic, Marcus Boerger and Johannes Schlueter.
A List of active developers can be found here:
And last but not least PHP was developed with the help of a huge amount of contributors all around the world.
VERSION INFORMATION
This manpage describes php, version 5.2.17.
Copyright (C)
The PHP Group
浏览 14971
echo 中文时在 cmd 下乱码,求解。有使用 UTF-8吗?
浏览: 7789499 次
来自: 洛杉矶
[url][img]引用[/img][/url]:
要是包含C1Calendar,内容就更完善了
实现客户端扫码登录分为下列四步:1. Web页面生成二维码生成 ...
帮助到我了。。尤其是第一个参数 ,我就是这直接载入 ...
谢谢,辛苦啦> 问题详情
定义非零向量OM=(a,b)的“相伴函数”为f(x)=asinx+bcosx(x∈R),向量OM=(a,b)称为函数f(x)=asinx+bcosx的“相伴
悬赏:0&答案豆
提问人:匿名网友
发布时间:
定义非零向量OM=(a,b)的“相伴函数”为f(x)=asinx+bcosx(x∈R),向量OM=(a,b)称为函数f(x)=asinx+bcosx的“相伴向量”(其中O为坐标原点).记平面内所有向量的“相伴函数”构成的集合为S.(1)设h(x)=cos(x+π6)-2cos(x+a)(a∈R),求证:h(x)∈S;(2)求(1)中函数h(x)的“相伴向量”模的取值范围;(3)已知点M(a,b)(b≠0)满足:(a-3)2+(b-1)2=1上一点,向量OM的“相伴函数”f(x)在x=x0处取得最大值.当点M运动时,求tan2x0的取值范围.
论文写作技巧
我有更好的答案
请先输入下方的验证码查看最佳答案
图形验证:
验证码提交中……当前位置:
&& 苏教版一年级上册语文教案《b p m f》教学设计
苏教版一年级上册语文教案《b p m f》教学设计
更多教学资料获取,请加入查字典 -名师聚集QQ群
教学目标:
1、学会4个声母b p m f,能够读准音,认清形,正确书写。
2、学习拼音读写方法,学习看图读带调音节。
教学重点难点:掌握b p m f的发音。
教学具准备及辅助活动:彩色挂图、字母卡片、画有四线格和描红笔顺的小黑板。
主要板书计划:
作业设计、安排:
教学过程:
一,复习检查
1,复习六个单韵母:a o e i u &
告诉学生:这五个单韵母都要读得清楚响亮,发音是口形不变。
2,按顺序认读带调的单韵母,颠倒顺序认读带调的单韵母。
二,指导看情景图,学习语境歌
1,出示情景图。
(1)图上画的是什么地方?
(2)图上主要画了什么?
(3)图上画了哪些人?他们在干什么?他们会说什么?
3,小结图意,在相应的地方出示音节。
大家爬上山坡去看大佛,这时,一个小朋友用手摸大佛。爸爸告诉他:&你听,大喇叭里已广播大佛是文物,不要用手摸。&
4,教学语境歌。
爸爸带我爬山坡,爬上山坡看大佛,大喇叭里正广播,爱护大佛不要摸。
三,教学声母bp
1,教学声母b,
A 教学b的读音。
a 出示图一。
提问:图上画了谁?他在什么地方,干什么?
b 告诉学生:波浪的&波&和我们今天要学的一个字母读音差不多,但也有点不一样。
教师读b和bo,要求学生注意听音,区别他们的不同。
d 范读,领读,齐读,指名读。
B 教学b的书写。
a 初步感知b的样子。
谁来说说b像什么?
教学顺口溜:像个6字bbb或帆板冲浪bbb。
b 指导笔顺。
教师在黑板上范写b,要求学生仔细看。
提问:b有几笔,先写什么,后写什么?
学生进行书空练习。
c 讨论b在四线格中的位置。
d 教师在四线格中范写b。
e 学生在书上描红。
2,教学声母p。
A 教学p的读音。
a 出示图二。
提问:图上画了谁?他在什么地方干什么?
b 告诉学生:爬坡的坡跟我们要学的一个字母读音有点像。
c 出示p。
教师读p和po,要求学生仔细听音,区别他们的不同之处。
d 学生练习发音,教师巡回指导。
B 教学p的书写。
a 初步感知p的样子。
谁来说说你怎样记住p?
教学顺口溜:小猴推车ppp或反写9字ppp。
b 指导书写笔顺。
自学情境图下p的书写方法。
指名三人到黑板上板演p的笔顺。
小结p的写法:p有两笔组成,先写一竖,后写右半圆。
教师范写,学生书空练习。
c 指导学生在四线格中写p。
教学顺口溜:有头向上升,有尾向下拖,没头没尾中间坐。
d 学生在书上描红。
四,巩固练习
1 卡片bp。
2 告诉学生:bp是声母。
3 区别bp的不同之处。
读音:b不送气,p要送气。
字形:b的半圆在右下,p的半圆在右上。
4 读下面的句子找出声母是b和p的字音。
A 八个孩子在山坡上做游戏。
B 平平再也不乱发脾气了。
一,复习检查
1、指读声母卡片bp。
2、教师引读:像个6字bbb,反写9字ppp。
二,授新课
1、学声母m,
A 教学m的读音
a出示图三
图上画了谁?他在什么地方干什么?
告诉学生:m的读音和蘑菇的&蘑&有点像。
c 教师范读:m和mo
d 教师范读,学生跟读。教师巡视,重点帮助发音有困难的学生。
B 教学m的书写
a 初步感知m的样子
指名说说记住m的方法。
b 指导书写笔顺。
教师范写,学生仔细看。
m有几笔组成,先写什么,后写什么?
c 告诉学生写在四线格的中格里。
d 学生描红。
2 教学声母f。
A 教学f的读音
a 出示图四
图上画的是什么人?他在干什么?
教师范读三遍。
c 领读,齐读,&开火车&读。
B 教学f的写法。
a 指名说说用什么方法记住f的字形。
b 自学课本中f的书写内容。
c 指明板演。
d 师生共同评议
三,巩固练习
1、抽读字母卡片:b p m f
2、听写字母:b p m f
3、猜字谜:
A 像个6字是什么?
B 像个小车是什么?
C 三个蘑菇是什么?
D 像个拐杖是什么?
一,复习检查
1,顺口溜读声母。
2,听写四个声母
二,授新课
1,教学拼读方法
A 出示两个小猴推卡片图。
指名说说这幅图是什么意思。
告诉学生:ba是个音节
B 教师范拼b&&a&&ba
C 讲述拼读方法。
前音轻短后音重,两音相连猛一碰。
D 教师领读学生跟读。
E 指名拼读]
2 练习拼读方法。
A 单独出示:&ba&,教师师范拼读。
B 领读,齐读,指名读。
C &开火车&拼读
3 看图拼读带调音节。
A 出示大雁图,练读图上音节。
图上画了什么?有几只大雁?
上一篇::
苏教版一年级上册试卷
苏教版一年级上册语文
苏教版一年级上册习题答案

我要回帖

更多关于 f b是什么意思 的文章

 

随机推荐