Solved

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

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

831 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