`
wonderfan
  • 浏览: 14073 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
最近访客 更多访客>>
社区版块
存档分类
最新评论
阅读更多
Apache acts your web server. Its main job is to parse any file requested by a browser and display the correct results according to the

code within that file. PHP is a server scripting language that allow your web site to be truly dynamic. PHP stands for Hypertext

Preprocessor.

PHP programs are written using a text editor,such as Notepad or WordPad,just like html pages. Unlike html ,though,php pages,for

the most part ,end in a .php extension. This extension signifies to the server that it needs to parse the php code before sending the

resulting html code to the viewer's web browser. One of the benifits of using php is that it is relatively simple and straightforward. As

with any computer language,there is usually more than one way to perform the same function. 

A constant is a placeholder for a value that you reference within your code. Constants are typically named with capital letters and the

values are usually formally defined before using them.  You defien a value assigned to a constant with the php function define().

Unlike constants, variables are obviously meant to be variable-they are meant to change or be changed at some point in your

program. Variables also do not need to be defined or declared and can simply be assigned when needed. Variables are denoted

with a dollar sign and are case-sensitive, as are constants. PHP also has numerous built-in mathematical functions that you can use

on variables that contain numbers such as the following:#rand;#ceil().

A session is basically a temporary set of variables that exists only until the browser has shut down. Every session is assigned a

unique session ID, which  keeps all the current information together. Your seesion ID can either be passed through the url or through

the use of cookies. Cookies are tiny bits of information stored on your web sitre vistor's computer. There appears to be some sort of

paranonia about using cookies ,so many people choose to disable this feature in theiw web browsers.  As with includes,functuions

make your code more efficient and easier to debug. Functions are blocks of coede that can be called from anywhere in your

program.  An array is just a row of information and the keys are the column headers. Keys are identifiers to help keep the information

organnized and easy to use.

GD is written in c++ and allow for the manipulation of certain image types. Because PHP can not automatically process images with

built-in functions,you need to make sure you have the GD library enabled. Fortunately, a bundled version comes with all recent

versions of php.

To help make things easier when using object-oriented programming,php5 has provided a handful of so-called magic methods.

These magic methods are specially named methods for all classes which are called automatically in certain scenarios. PHP5

includes a handful of magic methods that you can implement to provide special functionality for your classes. The three magic

methods -call,-get() and -set all allow you to access methods and properties of an object that haven't been explicitly defined.  The

magic method _call allows you to provide actions or return values when undefined methods are called on object. The magic methods

_get and _set allow you to specify custom functions to store and retrieve data in properties that are not already defined in the class.

PHP's url wrappers has been extended to become the basic mechanism of file interaction in general. One of the consequences of

this is that you can now use url in almost any context where a local file path would be appropriate. The most significant limitation

compared with say, java is that php streams are all bytes streams. To stream something else-object in particular-you need

serialization to convert it into something that will go through a stream. 
分享到:
评论

相关推荐

    class.phpmailer.php

    《PHPMailer邮件发送类详解与应用》 在PHP开发中,发送邮件是一项常见的需求,而PHPMailer是一个强大的、广泛使用的邮件发送类库,尤其适用于PHP5及以上版本。它提供了丰富的功能,包括支持SMTP验证、POP3收信以及...

    PHP 基础实例教程(PHP网页实例版)

    PHP 基础实例 在HTML中嵌入PHP 使用 PHP 标记 PHP 语句 使用 PHP 注释 PHP 语句间的空格问题 添加动态内容 使用 PHP 函数 PHP nl2br()格式化输出 PHP 打印格式化输出 PHP 字符串的整理 PHP 改变字符串中字母的大小写...

    PHP连接串口程序php_ser

    php实现RS232串口通信 下载php_ser_5.2.0.zip 解冻把php_ser放到ext目录下, php.ini里加上: extension=php_ser.dll PHP code string ser_version( void ) void ser_open( string port, int baudrate, int databits, ...

    PHP基础教程 是一个比较有价值的PHP新手教程!

    标题:PHP基础教程 出处:风流的CG网络日志 时间:Mon, 28 Aug 2006 07:24:34 +0000 作者:yufeng 地址:http:///read.php?38 内容: 提供给新手学习的 PHP新手教程,是一个比较有价值的PHP新手教程! 一、PHP...

    ZbarCode For PHP (PHP识别二维码)

    支持 PHP 版本 (Thread Safe): 5.5.* x86 5.5.* x64 5.6.* x86 5.6.* x64 测试环境 Windows7 64bit PHP 5.5.35 TS x86 PHP 5.5.35 TS x64 PHP 5.6.21 TS x86 PHP 5.6.21 TS x64 将对应的版本 ...

    PHP100视频教程全集112集BT种子【PHP经典】

    张恩民 老师 的PHP视频教程【www.php100.com】 绝对是PHP教程中的经典。 PHP100视频教程目录(共112集) PHP100视频教程1:环境配置与代码调试 PHP100视频教程2:PHP的数据类型与源码调试 PHP100视频教程3:常用PHP...

    php_igbinary.dll、php_redis.dll

    在PHP扩展库中,`php_igbinary.dll`和`php_redis.dll`是两个非常重要的组件,它们分别用于增强PHP与特定数据存储系统的交互能力。接下来,我们将详细探讨这两个DLL文件以及它们所代表的扩展。 首先,我们来看`...

    精美php网站模板 php源码

    【PHP网站模板与源码详解】 在Web开发领域,PHP是一种广泛应用的服务器端脚本语言,尤其在构建动态网站方面有着显著的优势。"精美php网站模板"是指预先设计和编码完成的网页布局,用于快速搭建具有专业外观和功能的...

    json for PHP4.0

    总结来说,"json for PHP4.0"提供了一种在PHP 4.0环境下处理JSON数据的方法,通过自定义的`Json`类模拟了`json_encode`的功能,允许开发者在不支持内置JSON功能的PHP版本中进行数据交换。通过学习和理解这个类的工作...

    php_redis.dll和php_igbinary.dll版下载,包含各个系统版本

    php_igbinary-1.2.1-5.5-nts-vc11-x64 php_igbinary-1.2.1-5.5-nts-vc11-x86 php_igbinary-1.2.1-5.5-ts-vc11-x64 php_igbinary-1.2.1-5.5-ts-vc11-x86 php_redis-2.2.7-5.6-nts-vc11-x64 ...

    PHP的FPDF的中文包chinese.php

    FPDF(Free PDF Generator)是一个用PHP编写的开源库,用于生成PDF文档。这个库的主要优点是它完全用PHP编写,无需任何外部依赖,因此在服务器端生成PDF文档时非常方便。"chinese.php"是FPDF的一个扩展,专门为解决...

    PHP php_igbinary.dll PHP5.4以上所有版本扩展

    PHP php_igbinary.dll PHP5.4以上所有版本扩展分别包括 php_igbinary-2.0.1-5.5-nts-vc11-x86 php_igbinary-2.0.1-5.5-ts-vc11-x64 php_igbinary-2.0.1-5.5-ts-vc11-x86 php_igbinary-2.0.1-5.6-nts-vc11-x64 ...

    php-5.4.7.tar.gz

    《PHP 5.4.7在Linux环境下的部署与应用详解》 PHP(Hypertext Preprocessor)是一种广泛使用的开源脚本语言,尤其在Web开发领域有着重要地位。本文将聚焦于PHP 5.4.7版本,这个版本在Linux操作系统上的部署、配置...

    php webshell 下载(目前功能强大齐全的php版webshell)

    声明:本PHP-webshell仅供学习交流以及网站安全检测之用,功能过于强大,请不要用过非法用途,否则一切后果由使用者本人承担! 使用方法:上传至网站任意目录连接即可,其中 $admin['pass'] = "admin"; 后面引号里...

    php动态网页作业 大学生网页 php+mysql

    这篇PHP动态网页作业是针对大学生设计的,旨在教授如何结合PHP和MySQL技术创建交互式的Web应用。PHP是一种广泛使用的开源脚本语言,尤其适合于Web开发,可以嵌入到HTML中,实现动态网页内容的生成。而MySQL则是一种...

    php期末考试试题

    PHP 期末考试试题解析 以下是对 PHP 期末考试试题的详细解析和知识点总结: 一、选择题部分 1. 该题考察了 PHP 的作用域和变量的使用。函数 `test` 中访问了全局变量 `$a`,但由于变量 `$a` 在函数外部定义,因此...

    (全)传智播客PHP就业班视频完整课程

    9-6 4.php xml编程⑨-综合练习-基于xml的在线词典 phpdom使用xpath 9-6 5.php xml编程(10)-SimpleXML 9-7 1.回顾 9-7 2.析构方法 9-7 3.static关键字(静态变量) 9-7 4.static关键字(静态方法) 面向对象编程三大特性...

    十大精典PHP项目开发全程案例 CD(源码)十大精典PHP案例作品源程序

    1,中小型企业内部自动化办公管理………PHP源码 2,网上社区系统……………………………PHP源码 3, 供求信息网………………………………PHP源码 4, 网络在线考试网站………………………PHP源码 5,电子商务购物商城...

Global site tag (gtag.js) - Google Analytics