Jump to content
xisto Community
bhavesh

Prob In Calling Php Function

Recommended Posts

First of all, I must confess I don't know php.
Now about my problem. I have installed a phpBB 3 Forum.
And tried to make a home page in php.
home page link -- MY
Forum link -- MY
The code for homepage index is (index.php)

<?php	define('IN_PHPBB', true);	$phpbb_root_path = 'forum/';	$phpEx = substr(strrchr(__FILE__, '.'), 1);	include($phpbb_root_path . 'common.' . $phpEx);	// Start session management	$user->session_begin();	$auth->acl($user->data);	$user->setup();	page_header('PAGE_HEADER');	$template->set_filenames(array(	   'body' => 'home_body.html',	));	make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));	page_footer();	?>

This code calls a html (home_body.html), whose code is as below:
<!-- INCLUDE overall_header.html -->   <div class="column1">  <div id="mainContent">	<h2> Main Content </h2>	<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy eleifend sollicitudin, molestie id, varius et, nibh.  Donec nec libero.</p>	<h2>H2 level heading </h2>	<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p>	<!-- end #mainContent --></div><!-- end #container --></div>	<!-- INCLUDE overall_footer.html -->

Now I have a php function (xyz.php) and I want to show the output of this xyz.php in the main home page i.e. in index.php

That is I want to call a php function from the html file (home_body.html)

Please any one help me in this regard.
Edited by bhavesh (see edit history)

Share this post


Link to post
Share on other sites

Well I am not properly sure about your problem, but I think you should add the code to the index.php. You have nothing to do home_body.html

<?php	define('IN_PHPBB', true);	$phpbb_root_path = 'forum/';	$phpEx = substr(strrchr(__FILE__, '.'), 1);	include($phpbb_root_path . 'common.' . $phpEx);	// Start session management	$user->session_begin();	$auth->acl($user->data);	$user->setup();	page_header('Nifty Pundit');   <!--include it here-->	$template->set_filenames(array(	   'body' => 'home_body.html',	));	make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));	page_footer();	?>

Edited by webishqiptar (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.