Solved

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

Posted on 2014-11-11
5
134 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 110

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

691 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