Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to a php file/function
#1
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
Reply
#2
If the functions in calender.php allow it you can use php include:

 <?php include('calender.inc.php'); ?>
Reply
#3
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
Reply
#4
Use plugin http://get-simple.info/extend/plugin/dynpages/81/
Reply
#5
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.
Reply
#6
You have to put the code inside the calendar.php file in a component. Then by using dynpages include it in your page.
Reply




Users browsing this thread: 1 Guest(s)