Jump to content
Larry Ullman's Book Forums

Recommended Posts

I am using this book in a course at an university.  I copied the password_hash.php and saved it to the includes folder.  How do I include the file, I guess what I really mean is where do I include the file.  I have tried the MySQL.ini.php.

 

 

Share this post


Link to post
Share on other sites

You can include it however you want, but following the conventions that Larry uses in the book, you will likely have the PHP file at the base of your web directory, and then have the password_hash.php file in a directory called inc, which would also be in the base web directory.

 

Assuming that structure, you would then include the password_hash.php file into your other PHP file as follows:

<?php
  
  include('inc/password_hash.php');

It's literally that simple.

And once you include a file, then you have access to all the code in that file as if you just copied and pasted all the code in that file into your other PHP script.

 

That all make sense?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...