Wrox Programmer Forums
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2005, 11:21 AM
Authorized User
 
Join Date: Jul 2004
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default DOCUMENT_ROOT

Hi programers,
good evening.

I have this line in my index.php page
<?php

require_once($_SERVER['DOCUMENT_ROOT'].'/accounts/header.php');

?>

but when I browse I see the following error:

Notice: Undefined index: DOCUMENT_ROOT in E:\raju\Website\xenexbd\index.php on line 2

But when I upload the page, it works well (server is linux). But I am facing problem while testing in my local page.

PC Info: WinXPSP2, IIS, PHP4.3.8.

How can I solve this page?

--
Best Regard
Md. Zakir Hossain (Raju)


Best Regard:
Md. Zakir Hossain (Raju)
www.rubd.net
www.xenexbd.com
Cheap Hosting, Domain, Reseller
www.forum.rubd.net
__________________
Best Regard:
Md. Zakir Hossain (Raju)

www.rajuru.xenexbd.com - my blog with PHP scripts, PHP Book Review and many more
 
Old September 14th, 2005, 01:07 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

It's just a 'notice'; not an error.

Use ini_set(display_errors, '0');

Or workout that line by guess like putting path information in a PHP variable and then pass it to require_once()

`~@#\^%&*/\.<.\/-|+|_!:;..=?>
Support Indian students' finances http://scholarship.mediasworks.com/





Similar Threads
Thread Thread Starter Forum Replies Last Post
upload files - Undefined index: DOCUMENT_ROOT lanita PHP How-To 4 July 14th, 2006 09:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.