GetSimple Support Forum

Full Version: How to a php file/function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I can generate pages well. I want to include a PHP file/function on one page ( it is file calendar.php to put a calendar on the page)

Can I embed the file so that is used and the calendar displayed?

Chris
If the functions in calender.php allow it you can use php include:

 <?php include('calender.inc.php'); ?>
On a web page I went to the Source code mode and inserted the line
<?php include('calender.inc.php'); ?>
When I updated the page and went to Source code mode again and the inserted line was then
<!--?php include('calender.inc.php'); ?-->
The function didn't work.
How do I get it to work?

Chris
I used the plug-in. I found that I had to put calendar.php in the plugins directory and activate it. The plug-in worked but on every page not just one where I put
{% calendar %}. Also it was the top of every page not where I wanted it.

Any further suggestions appreciated.
You have to put the code inside the calendar.php file in a component. Then by using dynpages include it in your page.