Answer the question
In order to leave comments, you need to log in
Why can't a file be included from a folder?
The site worked on hosting. On home computers, on win10 64, Denwer, everything worked.
Sent to the customer on his win10 (sent both the website and Denver in the archive (downloaded the latest version - www.denwer.ru/dis/Base/127001/Denwer3_Base_2013-06... ) and not a single file is included in the folder:
Z:\home \localhost\www\php
The site is very simple: Index.php and in it, at the beginning:
<?php
require_once "/php/log.php"; Removed
the
leading slash and it worked!
same?
Answer the question
In order to leave comments, you need to log in
require_once "/php/log.php";
you should have this folder with the file in the root of drive Z:
It's better to do this:
define('__ROOT__', dirname(dirname(__FILE__)));
require_once(__ROOT__.'/php/log.php');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question