仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1250|回复: 19
打印 上一主题 下一主题

[学习教程] PHP网页设计PHP中文函数连载(一)

[复制链接]
飘灵儿 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-2-3 23:54:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
要想从事软件开发工作,那么,还有很多的知识要学习,其实,不管是以后想去从事哪个工作,都需要自己去利用空闲的时间去不断的学习新的知识,不断的充实自己。函数|中文   函数Abs()
描写:
mixed abs (mixed number);
Returns the absolute value of number. If the argument number is float, return type is also float, otherwise it is int(前往所输的数字的相对值,浮点型前往浮点型,其他前往整型)
函数Acos()
描写:
float acos (float arg);
Returns the arc cosine of arg in radians(前往角的余弦值)
Adabas D功效
函数ada_afetch()
描写:
fetch a result row into an array(前往了局到一个数组里)
函数ada_autocommit()
描写:
toggle autocommit behaviour
函数ada_close()
描写:
close a connection to an Adabas D server (关失落一个数据库的联系关系)
函数ada_commit()
描写:
commit a transaction (提交一个处置)
函数ada_connect()
描写:
connect to an Adabas D datasource(联接一个数据库)
函数ada_exec()
描写:
prepare and execute a SQL statement(履行一个SQL语句)
函数ada_fetchrow()
描写:
fetch a row from a result(从数据库中取一笔记录)
函数ada_fieldname()
描写:
get the columnname(失掉字段名)
函数ada_fieldnum()
描写:
get column number(失掉字段的总数)
函数ada_fieldtype()
描写:
get the datatype of a field(获得字段的类型)
函数ada_freeresult()
描写:
free resources associated with a result
函数ada_numfields()
描写:
get the number of columns in a result(在了局中失掉字段数量)
函数ada_numrows()
描写:
number of rows in a result(所取了局的纪录数)
函数ada_result()
描写:
get data from results(失掉了局的数据)
函数ada_resultall()
描写:
print result as HTML table(以HTML的格局输入了局)
函数ada_rollback()
描写:
rollback a transaction
函数apache_lookup_uri()
描写:
Perform a partial request for the specified URI and return all info about it,This performs a partial request for a URI. It goes just far enough to obtain all the important information about the given resource and returns this information in a class. The properties of the returned class are:
status:the_request、status_line、method、content_type、handler
uri:filename、path_info、args、boundary、no_cache、no_local_copy、 allowed、send_bodyct、bytes_sent、byterange、clength、unparsed_uri mtime、request_time
函数apache_note()
描写:
Get and set apache request notes,apache_note()</B> is an Apache-specific function which gets and sets values in a request's notes table. If called with one argument, it returns the current value of note note_name . If called with two arguments, it sets the value of note note_name to note_value and returns the previous value of note note_name .
函数getallheaders()
描写:
Fetch all HTTP request headers(获得一切HTTP头部恳求)
例子:
$headers = getallheaders()</B>;
while (list($header, $value) = each($headers)) {
echo "$header: $value
\n";
}
这个例子将显示前往一切比来的头部恳求。
注:此函数只撑持APACHE下的PHP
函数virtual()
描写:
virtual()
is an Apache-specific function which is equivalent to in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-type header.
数组函数
函数array()
描写:
创立一个数组
array array(...)传回一数组的值,这些值可以用=>来附值。
上面申明了若何构建一个二维数组,及若何指定这个数组的key,和在正常的数组中以跳序的体例去指定命组的值。
Example 1. array()
example
$fruits = array(
"fruits" => array("a"=>"orange","b"=>"banana","c"=>"apple"),
"numbers" => array(1, 2, 3, 4, 5, 6),
"holes" => array("first", 5 => "second", "third")
);
函数array_walk()
描写:
函数的体例对每一个数组的元素做处置
int array_walk (array arr, string func);
利用一个叫FUNC的函数对ARR的每一个元素做处置,那些元素将当做是首传给FUNC的参数;假如FUNC需求超越一个参数,则在每次array_walk()呼唤FUNC时都发生一个正告信息,这些正告信息是可以消弭的,只需把'@'符号加在array_walk()
之前便可。
注重:FUNC会直接对ARR中的元素做处置,所以任何元素的变更将直接改动其在数组中的值。
Example 1. array_walk()</B> example
$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
function test_alter( $item1 ) { $item1 = 'bogus'; }
function test_print( $item2 ) { echo "$item2
\n"; }
array_walk( $fruits, 'test_print' );
array_walk( $fruits, 'test_alter' );
array_walk( $fruits, 'test_print' );
函数arsort()
描写:
以倒序的体例分列一数组但其序数则不变
void arsort (array array);
This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. Example 1. arsort()</B> example
$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
arsort($fruits);
for(reset($fruits); $key = key($fruits); next($fruits)) {
echo "fruits[$key] = ".$fruits[$key]."\n";
}
This example would display: fruits[a] = orange fruits[d] = lemon fruits = banana fruits[c] = apple The fruits have been sorted in reverse alphabetical order, and the index associated with each element has been maintained.
函数asort()
描写:
按次分列一数组且其序数不变
void asort (array array);
This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. Example 1. asort()</B> example
$fruits = array("d"=>"lemon","a"=>"orange","b"=>"banana","c"=>"apple");
asort($fruits);
for(reset($fruits); $key = key($fruits); next($fruits)) {
echo "fruits[$key] = ".$fruits[$key]."\n";
}

This example would display: fruits[c] = apple fruits = banana fruits[d] = lemon fruits[a] = orange The fruits have been sorted in alphabetical order, and the index associated with each element has been maintained.
理解网站这一概念之后不难看出,任何网站都是由网页组成的,也就是说想完成网站,必须先学会做网页,因此必须要掌握了HTML,才能为今后制作网站打下基础。
不帅 该用户已被删除
沙发
发表于 2015-2-4 06:58:39 | 只看该作者
建议加几个专业的phper的群,当然啦需要说话的人多,一处一点问题能有人回答你的,当然啦要让人回答你的问题,平时就得躲在里面聊天,大家混熟啦,愿意回答你问题的人自然就多啦。
小魔女 该用户已被删除
板凳
发表于 2015-2-9 18:15:52 | 只看该作者
最后介绍一个代码出错,但是老找不到错误方法,就是 go to wc (囧),出去换换气没准回来就找到错误啦。
金色的骷髅 该用户已被删除
地板
发表于 2015-2-10 05:40:11 | 只看该作者
环境搭建好,当你看见你的浏览器输出“it works\\\\\\\"时你一定是喜悦的。在你解决问题的时候,我强烈建议多读php手册。
爱飞 该用户已被删除
5#
发表于 2015-2-28 21:53:45 | 只看该作者
我学习了一段时间后,我发现效果并不好(估计是我自身的问题)。因为一个人的精力总是有限的,同时学习这么多,会导致每个的学习时间都得不到保证。
再现理想 该用户已被删除
6#
发表于 2015-3-10 08:09:53 | 只看该作者
至于模板嘛,各位高人一直以来就是争论不休,我一只小菜鸟就不加入战团啦,咱们新手还是多学点东西的好。
柔情似水 该用户已被删除
7#
发表于 2015-3-17 05:43:16 | 只看该作者
使用zendstdio 写代码的的时候,把tab 的缩进设置成4个空格是很有必要的
飘灵儿 该用户已被删除
8#
 楼主| 发表于 2015-3-17 16:09:32 | 只看该作者
如果你可以写完像留言板这样的程序,那么你可以去一些别人的代码了,
admin 该用户已被删除
9#
发表于 2015-3-24 11:13:49 | 只看该作者
你很难利用原理去编写自己的代码。对于php来说,系统的学习我认为还是很重要的,当你有一定理解后,你可你针对某种效果研究,我想那时你不会只是复制代码的水平了。
深爱那片海 该用户已被删除
10#
发表于 2015-4-1 07:08:39 | 只看该作者
要进行开发,搭建环境是首先需要做的事,windows下面我习惯把环境那个安装在C盘下面,因为我配的环境经常出现诡异事件,什么事都没做环境有的时候就不能用啦。
简单生活 该用户已被删除
11#
发表于 2015-4-4 04:34:59 | 只看该作者
小鸟是第一次发帖(我习惯潜水的(*^__^*) 嘻嘻……),有错误之处还请大家批评指正,另外,前些日子听人说有高手能用php写驱动程序,真是学无止境,人外有人,天外有天。
小妖女 该用户已被删除
12#
发表于 2015-4-11 06:09:09 | 只看该作者
学习php的目的往往是为了开发动态网站,phper就业的要求也涵盖了很多。我大致总结为:精通php和mysql
灵魂腐蚀 该用户已被删除
13#
发表于 2015-4-22 02:46:53 | 只看该作者
环境搭建好,当你看见你的浏览器输出“it works\\\\\\\"时你一定是喜悦的。在你解决问题的时候,我强烈建议多读php手册。
14#
发表于 2015-4-30 03:11:55 | 只看该作者
本人接触php时间不长,算是phper中的小菜鸟一只吧。由于刚开始学的时候没有名师指,碰过不少疙瘩,呗很多小问题卡过很久,白白浪费不少宝贵的时间,在次分享一些子的学习的心得。
乐观 该用户已被删除
15#
发表于 2015-5-1 00:09:12 | 只看该作者
如果你可以写完像留言板这样的程序,那么你可以去一些别人的代码了,
愤怒的大鸟 该用户已被删除
16#
发表于 2015-6-3 21:27:57 | 只看该作者
做为1门年轻的语言,php一直很努力。
再见西城 该用户已被删除
17#
发表于 2015-6-6 04:45:59 | 只看该作者
写的比较杂,因为我也是个新手,不当至于大家多多指正。
若天明 该用户已被删除
18#
发表于 2015-6-12 09:35:07 | 只看该作者
建议加几个专业的phper的群,当然啦需要说话的人多,一处一点问题能有人回答你的,当然啦要让人回答你的问题,平时就得躲在里面聊天,大家混熟啦,愿意回答你问题的人自然就多啦。
活着的死人 该用户已被删除
19#
发表于 2015-6-17 22:12:58 | 只看该作者
没接触过框架的人,也不用害怕,其实框架就是一种命名规范及插件,学会一个框架其余的框架都很好上手的。
莫相离 该用户已被删除
20#
发表于 2015-7-14 14:28:21 | 只看该作者
要进行开发,搭建环境是首先需要做的事,windows下面我习惯把环境那个安装在C盘下面,因为我配的环境经常出现诡异事件,什么事都没做环境有的时候就不能用啦。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-5-2 23:41

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表