recent searches:
include functions ,
variable functions ,
post functions...
If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.
PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
Now that PHP has grown to be a popular scripting language, there are a lot of public repositories and libraries containing code you can reuse. The PHP developers have largely tried to preserve backwards compatibility, so a script written for an older version will run (ideally) without changes in a newer version of PHP. In practice, some changes will usually be needed.
Two of the most important recent changes that affect old code are:
The deprecation of the old $HTTP_*_VARS arrays
(which need to be indicated as global when used inside a function or
method). The following
superglobal arrays
were introduced in PHP 4.1.0.
They are: $_GET, $_POST,
$_COOKIE, $_SERVER,
$_FILES, $_ENV,
$_REQUEST, and $_SESSION. The
older $HTTP_*_VARS arrays, such as
$HTTP_POST_VARS, still exist as they have since PHP 3.
As of PHP 5.0.0, the long PHP
predefined variable
arrays may be disabled with the
register_long_arrays
directive.
External variables are no longer registered in the global scope by
default. In other words, as of PHP
4.2.0 the PHP directive
register_globals is
off by default in php.ini. The preferred
method of accessing these values is via the superglobal arrays mentioned
above. Older scripts, books, and tutorials may rely on this
directive being on. If it were on, for example, one could use
$id from the URL
http://www.example.com/foo.php?id=42. Whether on
or off, $_GET['id'] is available.
Another Useful functions:
tutorial.oldcode | function.sdo-das-changesummary-getoldcontainer |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.