note 43712 added to function.main
| From: | mferguson at digitalalias dot net | Date: | Thu, 01 Jul 2004 02:28:42 +0000 |
| Subject: | note 43712 added to function.main | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72221@lists.php.net to get a copy of this message | ||
I got the PHP Fatal Error when trying to setup an INCLUDE statement using a combination of variables
and strings:
$vd_dir = 0; // used to turn on or off virtual directory for IIS
$vd_name = "flmedpro"; // virtual directory name used in IIS testing platform
$vd_path = "http://localhost/" . $vd_name .
"/"; // absolute localhost address
// toggle virtual directory on or off
if ($vd_dir == 0) {
$vd_path = "http://" . $vd_name . ".com/"; //
absolute web address
}
include($vd_path . "include/flmed.php"); // include main php file
The error message read:
[30-Jun-2004 21:46:15] PHP Warning: main() [<a href='http://www.php.net/function.main'>function.main</a>]:
Failed opening 'http://localhost/flmedpro/include/flmed.php'
for inclusion (include_path='.;c:\php4\pear') in D:\Web\Florida
Medical\html\db\home_fmp.php on line 49
[30-Jun-2004 21:46:15] PHP Fatal error: Call to undefined function: referral_stats() in
D:\Web\Florida Medical\html\db\home_fmp.php on line 163
[30-Jun-2004 22:30:12] PHP Notice: Undefined variable: login in D:\Web\Florida
Medical\html\db\index.php on line 166
[30-Jun-2004 22:30:13] PHP Warning: mysql_free_result(): supplied argument is not a valid MySQL
result resource in D:\Web\Florida Medical\html\db\index.php on line 166
Since the external PHP file cannot be loaded it fails to open any functions I've created.
----
Manual Page -- http://www.php.net/manual/en/function.main.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43712
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43712&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43712&report=yes
Search -- http://master.php.net/manage/user-notes.php