How can the issue of a cookie being only available in the script where it was set be resolved in PHP?

Issue: The problem of a cookie being only available in the script where it was set can be resolved by setting the cookie's path parameter to '/' when it is being set. This will make the cookie available across all paths on the domain.

// Set cookie with path parameter set to '/'
setcookie('cookie_name', 'cookie_value', time() + 3600, '/');