Hi @noise,
I think you’re using the include function wrong way. Include function work with file location path (starting with a drive letter or \ on Windows, or / on Unix/Linux systems) or relative to the current directory (starting with . or ..) not URL base path.
For more information check the documention.
https://www.php.net/manual/en/function.include.php
let me know if your problem solved.
Actually on the page referred:
<?php
/* This example assumes that www.example.com is configured to parse .php
* files and not .txt files. Also, 'Works' here means that the variables
* $foo and $bar are available within the included file. */
// Won't work; file.txt wasn't handled by www.example.com as PHP
include 'http://www.example.com/file.txt?foo=1&bar=2';
// Won't work; looks for a file named 'file.php?foo=1&bar=2' on the
// local filesystem.
include 'file.php?foo=1&bar=2';
// Works.
include 'http://www.example.com/file.php?foo=1&bar=2';
?>
-
This reply was modified 1 year, 5 months ago by
Phil Emery.