...

View Full Version : "require" with path syntax?



Bengal313
05-06-2004, 05:56 PM
I have a page called home.php. Then I have a sub folder called vcal which has _config.inc.php, _function.php, and _class_calendar.php. How do I correct the syntax below so it will point to th files correctly which are located in a sub folder called "vcal"? Thax


<?php
require "_config.inc.php";
require "_functions.php";
require "_class_calendar.php";

$calendar = new calendar;
$showcalendar = $calendar->create_currentmonth("150",1);
?>

bcarl314
05-06-2004, 06:10 PM
Try this...



define("INCLUDES","./vcal/");
require(INCLUDES."_config.inc.php");
require(INCLUDES."_functions.php");
require(INCLUDES."_class_calendar.php");


. = current directory
.. = parent directory



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum