Answer the question
In order to leave comments, you need to log in
include() function in PHP?
I just can’t figure it out ... Regardless of whether the following happens on the local machine or on a virtual server:
On the local server
Included:
Not included: On the remote server
Included:
Not included: On the local server (file in the directory)
Included:
Not included:include("functions.php");
include("http://localhost/functions.php");
include("functions.php");
include("http://site.ru/functions.php");
include("./dir/functions.php");
<? include("http://localhost/dir/functions.php"); ?>
include("./dir/functions.php");
include("http://site.ru/dir/functions.php");
Answer the question
In order to leave comments, you need to log in
In php.ini, the allow_url_include setting should be On. Just don't forget about safety.
do not want to include deleted files,
there are certainly alternative ways to solve the problem.
include only local files
if there is no access to php.ini, then you can add a line to .htaccess - php_value allow_url_include On
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question