note 43712 rejected from function.main by vincent
| From: | vincent@php.net | Date: | Thu, 01 Jul 2004 06:35:17 +0000 |
| Subject: | note 43712 rejected from function.main by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72226@lists.php.net to get a copy of this message | ||
Note Submitter: mferguson@digitalalias.net
----
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.