You've probably gotten used to using
#include statements in C. The equivalent function in PHP is
require(). If you have access to pset7 or pset8, just look at the distribution code provided. You'll definitely see
require() (or its close relative
require_once() near the top of files like
Also, note that the correct permissions for PHP files are
chmod 640, not
chmod 755. This won't prevent your code from running, but your permissions are unnecessarily lax and could introduce security vulnerabilities.
If you use
require() correctly, as seen in the examples I mentioned, you'll specify a relative or absolute path in the local file system, and you won't need to access a PHP file via an HTTP URL. In fact, if you have set your permissions correctly, nobody should have world-level permissions to read, write, or execute any PHP file from the world outside via the web.