Is it true I can't include a file up a dir like this:
require_once '../config.php';
This seems to work though:
require_once 'settings/db.php';
Strange.
~ Mike
-
Mike Zornek
Web Designer, Media Developer, Programmer and Geek
Personal site: http://MikeZornek.com
New Project:
Mike Zornek wrote:
Is it true I can't include a file up a dir like this:
require_once '../config.php';
You should be able to include a file up one (or more) directories. Are
you sure it's only up one directory from were your script is being
called from?
This seems to work though:
Depends on where the executed script is located ...
And it always depends on the script that is called - if you give a
relative path like you did here.
if the script you called would be
http://www.example.com/news/2004-04-10/mypage.php
then config.php would have to be in /news
if your layout is
Mike Zornek wrote:
Is it true I can't include a file up a dir like this:
require_once '../config.php';
This seems to work though:
require_once 'settings/db.php';
Strange.
Both works as long as other settings permit it - file permission and
owner, safe mode restrictions
--
PHP General
4 matches
Mail list logo