Posts: 20
Threads: 4
Joined: Nov 2014
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
Posts: 515
Threads: 21
Joined: Feb 2019
If the functions in calender.php allow it you can use php include:
<?php include('calender.inc.php'); ?>
Posts: 20
Threads: 4
Joined: Nov 2014
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
Posts: 1,928
Threads: 88
Joined: Apr 2010
Posts: 20
Threads: 4
Joined: Nov 2014
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.
Posts: 1,247
Threads: 82
Joined: Feb 2011
You have to put the code inside the calendar.php file in a component. Then by using dynpages include it in your page.