Solved

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

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

821 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