Jump to content

myfile.php as index file


ChrisTERiS

Recommended Posts

Hello,

I want to use my own file (eg myfile.php) as index.php. What is the standard code that must exist in this file?

eg I assume that the code below must exist

// 	#######################  SET PHP ENVIRONMENT  ##########################
	error_reporting(E_ALL & ~E_NOTICE);
// 	#######################  SET WHMCS ENVIRONMENT  ########################
	use WHMCS\ClientArea;
	define('CLIENTAREA', true);
	require_once("init.php");
	require_once("includes/functions.php");
	require_once("includes/clientareafunctions.php");

//  Here goes my own code

	$ca = new ClientArea();
	$ca->setPageTitle($FORUM_LANG['system_message']);
	$ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname'));
	$ca->initPage();

//  Here my own Template variables	
	
	// Render Template
	$ca->setTemplate('forum_system');
	$ca->output();

 

Anything else that need to be add? Also, if I replace index.php with my own file, should I mess the system?

Thank you

Chris

 

Edited by ChrisTERiS
Typo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated