Solved

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

Posted on 2014-11-11
5
127 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

705 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

20 Experts available now in Live!

Get 1:1 Help Now