Re: [PHP4BETA] require()
| From: | Michael Stearne | Date: | Thu, 02 Mar 2000 19:31:18 +0000 |
| Subject: | Re: [PHP4BETA] require() | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11385@lists.php.net to get a copy of this message | ||
Try using the absolute path to the files you want to include like:
require("/this/is/my/file/called/cm_globals.php3");
Michael
Criss Moosman wrote:
> Can someone explian this function to me I have not been able to get it to
> work and not really sure why. When I use it the file that is required
> never opens and the script gives me a parsing error.
>
> Example:
> require("cm_globals.php3");
> require("cm_common.php3");
>
> //SQL Statement for updating attributes to entry
> $updateStmt = "Update $tableName set NAME='$cn',
> EMAIL='$mail',
> CITY='locality', DESCRIPTION='$description',
> TELEPHONE='$telephonenumber' WHERE ROWID=$rowid";
>
> //Open Database Connection
> if(!($link=mysql_connect($hostName, $userName, $password)));
> DisplayErrMsg(sprintf("error connecting to host %s, by user %s,
> $hostName, $userName));
> exit();
> }
>
> The required files never open so hence I never connect to the database.
> Any help would be great.
> Criss Moosman
> Design Consultant
> Mojo Graphics
> www.mojographic.net
> 602.516.2625
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net