diff --git a/_includes/getting-started.md b/_includes/getting-started.md new file mode 100644 index 0000000..77a6d8b --- /dev/null +++ b/_includes/getting-started.md @@ -0,0 +1,37 @@ +# Getting Started + +## Use the Current Stable Version (5.4) + +If you are just getting started with PHP make sure to start with the current stable release of [PHP 5.4][php-release]. PHP has made great strides adding powerful [new features](#language_highlights) over the last few years. Don't let the minor version number difference between 5.2 and 5.4 fool you, it represents _major_ improvements. + +## Built-in web server + +You can start learning PHP without the hassle of installing and configuring a full-fledged web server (PHP 5.4 required). To start the server, run the following from your terminal in your project's web root: + + > php -S localhost:8000 + +* [Learn about the built-in, command line web server][cli-server] + +[php-release]: http://www.php.net/downloads.php +[cli-server]: http://www.php.net/manual/en/features.commandline.webserver.php + +## Windows Setup + +You can install PHP on windows from an install executable found on the official [PHP Downloads][php-downloads] page. For a complete Apache, MySQL, and PHP installation check out [WAMP][wamp-installer]. + +* [Read more about the official PHP Windows Installer][windows-installer] + +[php-downloads]: http://www.php.net/downloads.php +[windows-installer]: http://www.php.net/manual/en/install.windows.installer.msi.php +[wamp-installer]: http://www.wampserver.com/ + +## Mac Setup + +OSX comes prepackaged with PHP. As of Mountain Lion, it is _not_ the current stable version of PHP, though. You can get the PHP executable through a number of Mac [package managers][mac-package-managers] or [compile it yourself][mac-compile] (if compiling, be sure to have Xcode, or [this substitution][xcode-gcc-substitution], installed). For a complete Apache, MySQL, and PHP installation check out [MAMP2][mamp-downloads]. + +[mac-package-managers]: http://www.php.net/manual/en/install.macosx.packages.php +[mac-compile]: http://www.php.net/manual/en/install.macosx.compile.php +[xcode-gcc-substitution]: https://github.com/kennethreitz/osx-gcc-installer +[mamp-downloads]: http://www.mamp.info/en/downloads/index.html + +[Back to Top](#top){.top} diff --git a/_includes/language-highlights.md b/_includes/language-highlights.md index 9bcef03..6693d30 100644 --- a/_includes/language-highlights.md +++ b/_includes/language-highlights.md @@ -66,14 +66,9 @@ To run our script, above, from the command line: > php hello.php world Hello, world -### Built-in, command line web server - -Starting with PHP 5.4, you can develop locally on a PHP-enabled web server without the hassle of installing and configuring a full-fledged web server. To start the server, from your web root: - - > php -S localhost:8000 * [Learn about running PHP from the command line][php-cli] - * [Learn about the built-in, command line web server][cli-server] + * [Learn about setting up Windows to run PHP from the command line][php-cli-windows] [Back to Top](#top){.top} @@ -90,5 +85,5 @@ Starting with PHP 5.4, you can develop locally on a PHP-enabled web server witho [cli-options]: http://www.php.net/manual/en/features.commandline.options.php [argc]: http://php.net/manual/en/reserved.variables.argc.php [argv]: http://php.net/manual/en/reserved.variables.argv.php -[cli-server]: http://www.php.net/manual/en/features.commandline.webserver.php [php-cli]: http://php.net/manual/en/features.commandline.php +[php-cli-windows]: http://www.php.net/manual/en/install.windows.commandline.php diff --git a/_layouts/default.html b/_layouts/default.html index a8d3340..677defa 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -29,6 +29,14 @@