O'Reilly logo

PHP and MySQL Recipes: A Problem-Solution Approach, Second Edition by Frank M. Kromann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Frank M. Kromann 2016

Frank M. Kromann, PHP and MySQL Recipes, 10.1007/978-1-4842-0605-8_7

7. Files and Directories

Frank M. Kromann

(1)Trabuco Canyon, California, USA

In this chapter we are going to discuss two basic ways that files are used with PHP. The first one is the script with the PHP code in the form of the main script file and includes any files that the script might use. The second one is in the form of more content or data that is read off the local or remote file system and processed by the script.

Recipe 7-1. Include and Require

Problem

When PHP is used to execute or interpret a script it always starts with a single file. This can be as an input parameter to the command-line version of PHP (php-cli) or indirectly from a web server request ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required