admin 管理员组文章数量: 1184232
2024年4月23日发(作者:select是什么意思在手表上)
PHP Language Basics
Active Server Pages (PHP) is a proven, well-established technology
for building dynamic Web applications, which provides the power and
flexibility you need to create anything from a personal, Web based photo
gallery to a complete catalogue and shopping cart system for your next
eCommerce project。 One unique feature of PHP is that it lets you
choose your favourite scripting language, be it JavaScript or PHP ;
however, PHP is by far the most popular choice. In this article, I'll bring
you up to speed on the basic syntax of the PHP language, including
variables, operators, and control structures.
This article is the second in a series teaching PHP. Specifically, the
goal of this series is to teach you all you need to know to create dynamic
Web sites using PHP. This article picks up right where the previous article
in the series, Getting Started with PHP, left off.
Variables
Here is the listing for the first PHP script I helped you create in the
previous article:
1
2
3
4
5
6
7 ' Write out a simple HTML paragraph
8 Echo "
This is a test of PHP.
"9 ?>
10
11
As I admitted in that article, this is a pretty uninteresting example of
an PHP script. When it comes right down to it, this script doesn't do
anything a plain, old HTML page couldn't do. Oh sure, I gave a slightly
more interesting example that displayed the current server time, but to
be really useful a script needs to perform some form of calculation, or
manipulate dynamic information to present it in some interesting way.
The language used for writing most PHP programs, and which I'll be
using throughout this series, is called PHP . Like most programming
languages, PHP lets you store data in variables. A variable may be
thought of simply as a named location in memory where data may be
stored. PHP is what is known as a loosely typed language, which means
that a particular variable may store any kind of information, be it a
number, a piece of text, a date, or some more complicated chunk of data
(as opposed to strictly typed languages where you can only store one
kind of information in each variable). Before you can use a variable,
though, you must declare it; that is, you must let PHP know that you
版权声明:本文标题:PHP外文翻译 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1713856315a654706.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论