ebook img

PHP 7 in easy steps PDF

270 Pages·2016·11.36 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview PHP 7 in easy steps

Mike McGrath PHP 7 In easy steps is an imprint of In Easy Steps Limited 16 Hamilton Terrace . Holly Walk . Leamington Spa Warwickshire . United Kingdom . CV32 4LY www.ineasysteps.com Copyright © 2016 by In Easy Steps Limited. All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without prior written permission from the publisher. Notice of Liability Every effort has been made to ensure that this book contains accurate and current information. However, In Easy Steps Limited and the author shall not be liable for any loss or damage suffered by readers as a result of any information contained herein. Trademarks All trademarks are acknowledged as belonging to their respective companies. Contents 1 Getting started Introducing PHP Installing the Abyss server Installing the PHP engine Integrating Abyss and PHP Embedding PHP script code Scripting by the rules Summary 2 Storing values Creating variables Quoting strings Producing arrays Sorting arrays Describing dimensions Checking types Defining constants Exploring superglobals Summary 3 Performing operations Doing arithmetic Making comparisons Examining conditions Assessing logic Comparing bits Changing values Grasping precedence Summary 4 Testing conditions Seeking truth Providing alternatives Switching branches Performing loops Looping while true Breaking from loops Summary 5 Employing functions Defining functions Passing arguments Varying parameters Recognizing scope Returning values Calling back Summary 6 Manipulating strings Comparing characters Searching text Extracting substrings Changing case Formatting strings Making dates Encoding entities Summary 7 Building classes Encapsulating data Creating an object Initializing members Using constructors Inheriting properties Embracing polymorphism Summary 8 Handling files Reading files Reading lines Reading characters Writing a file Appending text Handling errors Catching exceptions Summary 9 Producing forms Performing actions Checking set values Validating form data Filtering data Sending hidden data Handling submissions Making sticky forms Uploading files Surrounding forms Appending link data Summary 10 Preserving data Submitting cookie data Setting cookies Getting cookies Viewing cookie data Submitting session data Setting sessions Getting sessions Viewing session data Summary 11 Connecting databases Making a connection Creating a forum Providing the page Supplying a form Processing messages Confirming success Summary 12 Adding Web Services Loading data Getting nodes Getting attributes Including feeds Setting parameters Selecting components Summary 1 Getting started Welcome to the exciting world of the interactive web with PHP. This chapter demonstrates how to create a dynamic development environment with a web server and the PHP engine. Introducing PHP Installing the Abyss server Installing the PHP engine Integrating Abyss and PHP Embedding PHP script code Scripting by the rules Summary Introducing PHP The most appealing modern websites provide a customized user experience by dynamically responding to some current condition – user name, time of day, latest blog, shopping cart contents, etc. Many of these dynamic websites are created using PHP. What is PHP? PHP is a widely-used general purpose scripting language that is especially suited for web development and can be embedded into HTML. It was created by programmer Rasmus Lerdorf, as a set of scripts to maintain his website that he released as “Personal Home Page Tools (PHP Tools) version 1.0” on June 8, 1995. This is the official logo of the PHP project – the official online home of PHP can be found at php.net The tools were extended in the version 2 release of 1997, and the name changed to become a recursive acronym “PHP: Hypertext Preprocessor” in version 3 the following year. Performance, reliability and extensibility was improved in 2000 with the release of PHP4, which was powered by the Zend engine virtual machine. Subsequently, PHP5 was released in 2004 powered by the new Zend II engine and produced as free software by the PHP group. A planned experimental version PHP6, that intended to introduce native Unicode support throughout PHP was abandoned. The current version PHP7 was released in 2015, and is powered by the latest Zend 3 engine that offers improved performance. Today PHP is installed on over 20 million websites and 1 million web servers. This is the “elePHPant” – the mascot of the PHP project, designed by Vincent Pontier. Why is PHP popular? • PHP is extremely simple for a newcomer, but offers many advanced features for a professional programmer. • PHP code is enclosed in special start and end processing tags that allow you to jump into and out of “PHP mode”, to implement instructions within an HTML document. • PHP code is executed on the server (“server-side”), unlike JavaScript code that is executed in the browser (“client-side”). The client receives the results of running the script without knowing what the underlying code was. Recently, server-side has become to be known as “The Cloud”.

Description:
PHP 7 in easy steps will teach you to code server-side scripts. It begins by explaining how to install a free web server and the PHP interpreter to create an environment in which you can produce your own data-driven server-side web pages. You will learn how to write PHP server-side scripts and how t
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.