O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

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

Time for action — hooking up our application to Bones

Let's start by creating the Bones library and then connecting our index.php file to it.

  1. Create a file named bones.php inside of the lib folder of our working directory (/Library/Webserver/Documents/verge/lib/bones.php).
  2. Add the following code to the index.php file in our working directory, so that we can talk to the newly created bones.php file:
    <?php
    include 'lib/bones.php';
    

What just happened?

All that this code is doing is including our lib/bones.php file, and that's good enough for us right now! Notice that we didn't end the file with a ?>, as you may be accustomed to seeing. The ?> tag is actually optional, and, in our case, leaving it will allow us to reduce the unwanted whitespace and to ...

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