include php file

Here you can find the topics for dolphin 6.x.x
  • Ads

include php file

Postby xmccay » Sun Nov 15, 2009 7:29 pm

Hi,

May i know how can I include a php file in the dolphin template header or footer since the template header and footer file is in html ?

Please advise. thanks.
xmccay
Jr. Member
Jr. Member
 
Posts: 195
Joined: Sat Nov 01, 2008 3:42 pm

Re: include php file

Postby Administrator » Mon Nov 16, 2009 2:30 am

You have to add a key "__include_file__" to the html file.

Then you have to write the code as follows,

$_page[$ni]['include_file'] = included file.
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: include php file

Postby xmccay » Mon Nov 16, 2009 5:44 am

Hi Praveen,

Thanks for the info :
You have to add a key "__include_file__" to the html file.

now I added __currenttime__

Then you have to write the code as follows,
$_page[$ni]['include_file'] = included file.

Where should I add the script below? I should insert something like this right?
$_page[$ni]['currenttime'] = currenttime.php?

Please advise and thanks.
xmccay
Jr. Member
Jr. Member
 
Posts: 195
Joined: Sat Nov 01, 2008 3:42 pm

Re: include php file

Postby Administrator » Mon Nov 16, 2009 6:38 pm

instead of "currenttime.php?" you need to add the code that needs to be included.
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: include php file

Postby xmccay » Tue Nov 17, 2009 1:56 am

Hi Praveen,

Which file should I add this :

$_page[$ni]['currenttime'] = 'echo time()';

I tried to add into the html footer file but it is not working.

Please advise and thanks.
xmccay
Jr. Member
Jr. Member
 
Posts: 195
Joined: Sat Nov 01, 2008 3:42 pm

Re: include php file

Postby Administrator » Wed Nov 18, 2009 3:55 pm

It should be as follows.

Code: Select all
$_page[$ni]['currenttime'] = time();
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: include php file

Postby xmccay » Thu Nov 19, 2009 7:34 am

Hi Praveen,

where this code should be added? I added the in footer html file but it is not working.

Please advise.
xmccay
Jr. Member
Jr. Member
 
Posts: 195
Joined: Sat Nov 01, 2008 3:42 pm

Re: include php file

Postby Administrator » Fri Nov 20, 2009 4:00 pm

You need to add key to html(__name__) file and php code to the php file.
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: include php file

Postby jakehake » Sun Mar 14, 2010 2:12 pm

Hi,

I also need to include a php file inside my template like:
<?php
define('NOHACK',1);
require_once('/home/domains/example.com/htdocs/directory/file.php');
?>

How can I do this ?
jakehake
Newbie
Newbie
 
Posts: 1
Joined: Sun Mar 14, 2010 2:10 pm

Re: include php file

Postby Administrator » Mon Mar 15, 2010 9:17 am

In your template files, you can add keys and then you can add the necessary contents from the template function in inc/design.inc.php
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

  • Ads

Return to Dolphin 6

Who is online

Users browsing this forum: No registered users and 1 guest

cron