Solved

Can you help me translate this code and find the php that I need to modify?

Posted on 2014-11-11
5
130 Views
Last Modified: 2014-11-12
Hello - I am trying to modify the PHP code on a site so that I can adjust the title bar.  Yet I am not sure which php file I need to modify!

When I go to index.php (in the public_html folder) I get the following.  What exactly does this mean, and is this trying to point me in the direction of the real php code that powers the site?

<?php

	error_reporting(E_ALL);
	$system_folder = "qmax";
	$application_folder = "application";
	$public_folder = "public_html/";

$modules_folder = realpath(dirname(__FILE__)).'/'.$system_folder.'/'.$application_folder.'/modules/';
$assets_folder = realpath(dirname(__FILE__)).'/assets';
$templates_folder = realpath(dirname(__FILE__)).'/assets/templates';
$public_folder = realpath(dirname(__FILE__));
	
if (strpos($system_folder, '/') === FALSE)
{
	if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
	{
		$system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
	}
}
else
{
	$system_folder = str_replace("\\", "/", $system_folder); 
}

define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');
define('ASSETSPATH', $assets_folder.'/');
define('TEMPLATESPATH', $templates_folder.'/');
define('PUBLICPATH', $public_folder);
define('CACHEPATH', $system_folder.'/cache/');

if (is_dir($application_folder))
{
	define('APPPATH', $application_folder.'/');
}
else
{
	if ($application_folder == '')
	{
		$application_folder = 'application';
	}

	define('APPPATH', BASEPATH.$application_folder.'/');
}
define('MODPATH', $modules_folder);

require_once BASEPATH.'main/Main'.EXT;

Open in new window

0
Comment
Question by:victoria franklin
5 Comments
 
LVL 14

Accepted Solution

by:
Dzynit earned 500 total points
ID: 40435362
I would try the /assets/templates folder first and see if there is a header template in it. If not, one of the templates in that folder might shed some more light on where to look.
0
 
LVL 9

Expert Comment

by:Brian Tao
ID: 40435624
Based on the code I guess it's using Codeigniter framework.  To get the actual default page, please follow the steps:
1. look into the folder public_html/application/config
(If there's no such folder then I'm guess it wrong about using "Codeigniter".  Just ignore me.)
2. there should be a file called "routes.php"
3. in the php file look for a line that starts with $route['default_controller'], and remember the value of it
4. go into public_html/application/controllers folder
5. there should be a php file whose filename is the value from point 3

That's the file you should be looking at.
0
 

Author Comment

by:victoria franklin
ID: 40435628
Wasn't codeignitor, but thanks!
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 40436419
Are you telling us that when you go to index.php, it exposes PHP source code instead of rendering an HTML document?
0
 

Author Comment

by:victoria franklin
ID: 40438408
I have FTP and can look at the files.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now