This is a discussion on "PHP Includes" within the PHP Forum section. This forum, and the thread "PHP Includes are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
PHP Includes
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
PHP Includes
I am used to the nice easy include statements of ASP, why can I not just include files like this?
|
|
|
|
#2
|
||||
|
||||
|
Re: PHP Includes
Yayhooray!
|
|
#3
|
|||
|
|||
|
Re: PHP Includes
What you have written is fine in terms of syntax. Its probably a case of not being able to find the file. As a general rule, if the file isnt in the same directory use:
<?php require_once($_SERVER['document_root'].'/db/DB.php'); ?> |
|
#4
|
|||
|
|||
|
Re: PHP Includes
Quote:
|
![]() |
| Tags |
| php, includes |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| xsl includes | sconard | Other Programming Languages | 0 | Aug 24th, 2006 13:11 |
| PHP Includes | daygon | PHP Forum | 5 | Mar 16th, 2006 01:59 |
| CSS and includes | rewmer | Web Page Design | 4 | Aug 14th, 2005 10:31 |
| Further Help with Includes | freebirdnz | Classic ASP | 3 | Aug 5th, 2004 13:48 |
| Help with includes. | freebirdnz | Classic ASP | 5 | Aug 3rd, 2004 14:38 |