Page 1 of 1
Virtual Directory Support: off, need help with code
Posted: Fri Jun 24, 2005 11:19 am
by nevans
Hi have this code below, that call the function virtual(). I was told by my host that Virtual Directory support is not enable on the shared server and they are not going to enable it. They said I should re-write the code to use another function. I have not idea how to do it. I am not a PHP programmer. This code is for a webcalendar. Can someone please help me.
Here is the code.
Code: Select all
<?
// Sample code for including CyberCalendar into your dynamic documents
$Calendar = "Calendar=$Calendar";
if ($DateID) { $DateID = "&DateID=$DateID"; }
if ($View) { $View = "&View=$View"; }
if ($searchtext) { $searchtext = urlencode($searchtext); $searchtext = "&searchtext=$searchtext"; }
if ($Category) { $Category = urlencode($Category); $Category = "&Category=$Category"; }
if ($Repeatid) { $Repeatid = "&Repeatid=$Repeatid"; }
if ($Next) { $Next = "&Next=$Next"; }
$query = "$Calendar$DateID$View$searchtext$Category$Repeatid$Next";
virtual("/calendar/index.pl?$query");
?>
d11wtq | Hey look what these
Posted: Fri Jun 24, 2005 11:25 am
by dethron
Code: Select all
<?
// Sample code for including CyberCalendar into your dynamic documents
$Calendar = "Calendar=$Calendar";
if ($DateID) { $DateID = "&DateID=$DateID"; }
if ($View) { $View = "&View=$View"; }
if ($searchtext) { $searchtext = urlencode($searchtext); $searchtext = "&searchtext=$searchtext"; }
if ($Category) { $Category = urlencode($Category); $Category = "&Category=$Category"; }
if ($Repeatid) { $Repeatid = "&Repeatid=$Repeatid"; }
if ($Next) { $Next = "&Next=$Next"; }
$query = "$Calendar$DateID$View$searchtext$Category$Repeatid$Next";
include("/calendar/index.pl?$query");
?>
Posted: Fri Jun 24, 2005 10:31 pm
by nevans
dethron wrote:Code: Select all
<?
// Sample code for including CyberCalendar into your dynamic documents
$Calendar = "Calendar=$Calendar";
if ($DateID) { $DateID = "&DateID=$DateID"; }
if ($View) { $View = "&View=$View"; }
if ($searchtext) { $searchtext = urlencode($searchtext); $searchtext = "&searchtext=$searchtext"; }
if ($Category) { $Category = urlencode($Category); $Category = "&Category=$Category"; }
if ($Repeatid) { $Repeatid = "&Repeatid=$Repeatid"; }
if ($Next) { $Next = "&Next=$Next"; }
$query = "$Calendar$DateID$View$searchtext$Category$Repeatid$Next";
include("/calendar/index.pl?$query");
?>
The 'include' took away the error but I am not getting the page to work. The pages loads blank, like there is a problem with the index.pl
Posted: Fri Jun 24, 2005 10:42 pm
by neophyte
nevans wrote:
The 'include' took away the error but I am not getting the page to work. The pages loads blank, like there is a problem with the index.pl
PHP pages should be saved with ".php" extension.
Posted: Fri Jun 24, 2005 11:14 pm
by nevans
neophyte wrote:nevans wrote:
The 'include' took away the error but I am not getting the page to work. The pages loads blank, like there is a problem with the index.pl
PHP pages should be saved with ".php" extension.
The page that have the code above is called index.php so that's not the issue. The code - include ("/calendar/index.pl?query"); is not working correct , it was virtual ("/calendar/index.pl?query"); before but the server doesn't support the virtual php function that works with apache. I need to use another function that does the same thing like virtual() and works with CGI & .pl files which would parse through Apache.
Posted: Sat Jun 25, 2005 3:41 pm
by Chris Corbyn
Just inlclude('
http://localhost/calendar/index.pl?$query')
The other way is too do this in run the perl script as a CLI but get the ouput....
Code: Select all
system('perl /path/to/index.pl '.$query);