【文章內(nèi)容簡介】
tes that exist today. Apache is an opensource project that runs on virtually all available operating Apache server is a munitydriven project, with many developers contributing to its progress. Apache’s opensource roots also means that the software is available free of charge, which probably contributes heavily to Apache’s overwhelming popularity relative to its petitors, including Microsoft’s IIS and Google’s GWS, among others. On the Apache web site (), Apache HTTP Server is described as “an effort to develop and maintain an opensource HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a 4 secure, efficient, and extensible server that provides HTTP services in sync with the current HTTP standards.” Installing PHP Apache, and MySQL (the Hard Way).One of the biggest hurdles for new programmers is starting. Before you can write your first line of PHP, you must first download Apache and PHP, and usually MySQL, and then fight through installation instructions that are full of technical jargon you might not understand yet. This experience can leave many developers feeling unsure of themselves, doubting whether they have installed the required software correctly. In my own case, this hurdle kept me from learning programming for months, even though I desperately wanted to move beyond plain ol’ HTML. I unsuccessfully attempted to install PHP on my local machine not once, but three different times before I was able to run my first PHP mand successfully. Fortunately, the development munity has responded to the frustration of beginning developers with several options that take all the pain out of setting up your development environment, whether you create applications for Windows, Mac, or Linux machines. These options include allinone solutions for setting up Apache, MySQL, and PHP installations. The most mon allinone solution is a program called “XAMPP”, which rolls Apache, MySQL, PHP, and a few other useful tools together into one easy installer. XAMPP is free and available for Windows, Mac, and Linux, so this book assumes you will use it as your development environment. Keywords and Language syntax As with many scripting languages, PHP scripts are normally kept as humanreadable source code, even on production web servers. In this case, PHP scripts will be piled at runtime by the PHP engine, which increases their execution time. PHP scripts are able to be piled before runtime using PHP pilers as with other programming languages such as C (the language PHP and its extensions are written in). Code optimizers PHP is similar to most high level languages that follow the C style syntax. If conditions, for and while loops, and function returns are similar in syntax to languages such as C, C++, Java and Perl. PHP stores whole numbers in a platformdependent range. This range is typically that of 32bit signed integers. Unsigned integers are converted values in certain situations。 this behavior is different from other programming languages. Integer variables can be assigned using decimal (positive and negative), octal, and hexadecimal notations. Floating point numbers are also stored in a platformspecific range. They can be specified using 5 floating point notation, or two forms of scientific notation. PHP has a native Boolean type that is similar to the native Boolean types in Java and C++. Using the Boolean type conversion rules, nonzero values are interpreted as true and zero as false, as in Perl and C++. The null data type represents a variable that has no value. The only value in the null data type is NULL. Variables of the “resource”