+ 2
Can we use url in php include ?¿
This works :- include 'index.php'; But it can't :- include 'www.example.php';
4 Réponses
+ 1
Thanks but another idea
0
Include is for localhost files
You can try this
file_get_contents('the site here');
0
You need access to modify some settings in php.ini to enable include() of remote files.
Quoted from https://www.php.net/manual/en/features.remote-files.php
"As long as allow_url_fopen is enabled in php.ini, you can use HTTP and FTP URLs with most of the functions that take a filename as a parameter. In addition, URLs can be used with the include, include_once, require and require_once statements (allow_url_include must be enabled for these)."