Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8054 Posts in 1860 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)Can I use PHP includes instead of SSI?
Pages: [1]   Go Down
Print
Author Topic: Can I use PHP includes instead of SSI?  (Read 672 times)
0 Members and 1 Guest are viewing this topic.
Jason
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: January 21, 2002, 09:37:00 PM »

I've got a website that's built with PHP and I'd like to be able to include the calendar in the exact same way as I have with an SSI exec.Is there a way? I used <?php include ("calendar/calendar.pl"); ?> to no avail...
Logged

Jason
Jason
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #1 on: January 23, 2002, 09:30:00 PM »

help a junior member out?

=)

------------------
Jason

Logged

Jason
Scott
Guest
« Reply #2 on: January 23, 2002, 10:04:00 PM »

I would, but I know nothing about PHP, or how it works with CGI  

------------------
Scott
CalendarScript.com


Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 235

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: February 16, 2002, 05:20:00 PM »

If PHP is compiled into Apache, you can use:

<?php virtual ("calendar/calendar.pl"); ?>

You may need to use the complete URI from the root directory. Eg.

<?php virtual ("/cgi-bin/calendar/calendar.pl"); ?>

If PHP is NOT compliled into Apache, you will have to read the output of calendar.pl with file() using the full URL (http://.../calendar.pl) and echo each line of the array. Eg.

<?php
$calendar = file("http://your-site.com/cgi-bin/calendar/calendar.pl");
while ( list($key, $line) = each( $calendar ) )
   {
   echo "$line";
   }
?>

Dan O.

Logged
Cherie
New Member
*

Karma: 0
Offline Offline

Posts: 0

Jack of all trades


WWW
« Reply #4 on: July 27, 2002, 06:55:00 PM »

I was so excited when I got this to work on first try..but..after I re-uploaded the whole freakin' site..I went to the page with the calendar that was "php'd in" and it looked great..then I hit one of the links in the calendar and it jumps out of my webpage into it's own page..is this the way it's suppose to do??

see here: http://cbsites.com/testing/

then click on a month or anything..it "jumps" out of the page back to default..I lose my navigation...is this the only way?..can I code it to open in the original page? I am using NetObjects Fusion 7 to do the page

------------------
Thanks,
Cherie

Logged

Thanks,
Cherie
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 235

Please don't PM me. Post in the open forum.


WWW
« Reply #5 on: July 28, 2002, 03:06:00 PM »

 
quote:
then I hit one of the links in the calendar and it jumps out of my webpage into it's own page..is this the way it's suppose to do?

That's the only way it can work when including the script into a PHP page as all the original calendar's URLs stay the same (meaning pointed to the real CS pages). In order for it to stay inside a PHP page, you would have to modify the calendar URLs to point to a PHP script that then loads the calendar each time and rewrites the output as if it is it's own content.

That will increase server load though, processing PHP and Perl for every page view!

Dan O.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 235

Please don't PM me. Post in the open forum.


WWW
« Reply #6 on: October 19, 2003, 06:17:00 PM »

** That's the only way it can work when including the script into a PHP page as all the original calendar's URLs stay the same **

Of course, if you included the ssi.html template's output into your PHP page, it would then just link to a stand-alone calendar that same way it does when called via SSI.

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: