Include sur adresse complète ne fonctionne pas!
Posté : 15 févr. 2012, 04:27
Bonjour, je comprend pas pourquoi ça fonctionne:
et ça non:
Voici les erreurs:
[Wed Feb 15 02:11:16 2012] [error] [client 86.147.97.162] PHP Warning: include(//monsite.net/header.php): failed to open stream: No such file or directory in /var/www/index.php on line 14
[Wed Feb 15 02:11:16 2012] [error] [client 86.147.97.162] PHP Warning: include(): Failed opening '//monsite.net/header.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 14
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-fopen
allow_url_fopen = On
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
allow_url_include = Off ; testé avec on et off
si je tappe une de ces 4 adresses dans mon navigateur j'arrive sur la page sans problèmes...
Merci pour l'aide.
Code : Tout sélectionner
<?php
include 'header.php';
?>et ça non:
Code : Tout sélectionner
<?php
include '//monsite.net/header.php';
?>[Wed Feb 15 02:11:16 2012] [error] [client 86.147.97.162] PHP Warning: include(//monsite.net/header.php): failed to open stream: No such file or directory in /var/www/index.php on line 14
[Wed Feb 15 02:11:16 2012] [error] [client 86.147.97.162] PHP Warning: include(): Failed opening '//monsite.net/header.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 14
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-fopen
allow_url_fopen = On
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
allow_url_include = Off ; testé avec on et off
si je tappe une de ces 4 adresses dans mon navigateur j'arrive sur la page sans problèmes...
Merci pour l'aide.