HELP - How do I find the HTML in a PHP designed Web site?

  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

ALL,

How do I as an HTML/CSS/Dreamweaver designer locate the HTML files to update/edit web site that only display php.index files? I know there are HTML files somewhere within the root folders, but I can not locate them. This projects need text and image updates and I am stuck trying to find the right path to the right folder to the right file to the right line of code. Please any help would mean a lot.

cgfX
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Why do you assume that there are HTML files somewhere? Have you looked at the PHP files to see if the contained within?
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

Yes you can see the HTML coding in a web browers, and edit the code with tools like FireFox Fire bug, but when downloading the files and going into the folders I have not been able to locate the HTML.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Yes, that may be the case, but that doesn't mean that PHP files aren't the source. Have a look at the php example code below:

HelloWorld.php
Code: [ Select ]
<html>
<?php         
    echo "<head><title>Hello World!</title></head>";
?>
<body>
<?php 
    echo "<span style=\"font-color:#333;\">Hello World!</span>";
?>
</body>
</html>
  1. <html>
  2. <?php         
  3.     echo "<head><title>Hello World!</title></head>";
  4. ?>
  5. <body>
  6. <?php 
  7.     echo "<span style=\"font-color:#333;\">Hello World!</span>";
  8. ?>
  9. </body>
  10. </html>


As you can see, you can mix HTML into php files either directly or by echoing it as output. When you view source, all you will see is a plain HTML file (see below). That's because PHP is a server-side language. I hate to be the bearer of bad news, but what you're looking for is probably buried in .php files, so I recommend that you run through some quick PHP primers and then go searching. One of our members, Bogey, has written a 4-part tutorial on Learning PHP that you may be interested in. Start with Part 1:http://www.ozzu.com/php-tutorials/tutorial-learning-php-part-t86307.html

output:
Code: [ Select ]
<html>
<head><title>Hello World!</title></head>
<body>
<span style="font-color:#333;">Hello World!</span>
</body>
</html>
  1. <html>
  2. <head><title>Hello World!</title></head>
  3. <body>
  4. <span style="font-color:#333;">Hello World!</span>
  5. </body>
  6. </html>
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Thread relocated to programming forum - it's apparent to me that the issue is PHP related & OP started a dup, so this will take care of it.

CGFX: Please continue the discussion here rather than starting duplicate threads, thanks.
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

UPSGuy,

Thank you.

cgfX
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

No problem, have you had a look at my reply? Any luck in locating what you're looking for yet?
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8397
  • Loc: USA

Post 3+ Months Ago

You mean index.php files? What script are you using? (I assume you are using a pre-made script since you can't locate a file).
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

Bogey,

Yes there is an index.php file and yes this website http://www.yourpapertrail.net/ was created by another designer and has been assigned to me to do text and image updates.

There are two pages that needs edit updates:

1. http://www.yourpapertrail.net/realtors/referral
On this page I simply have to update a line of text in the body of the green right hand box.

2. http://www.yourpapertrail.net/tellafriend
You can easily see where I need to add three images

Both of the above pages appear to have subfolders within the root i.e. /referral & /tellafriend.
But the only subfolders in this root folder are:

1. _web backup 013009 2. cgi-bin 3. classes 4. customs 5. demo 6. fonts 7. images 8. js 9. system 10. test 11. upload

Again none where name referral or tellafriend, and I searched the index.php not being able to find the HTML or a hint to where the HTML might be located.

Below is the index.php code

Code: [ Select ]
<?php
/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|---------------------------------------------------------------
|
| By default CI runs with error reporting set to ALL.  For security
| reasons you are encouraged to change this when your site goes live.
| For more info visit:  http://www.php.net/error_reporting
|
*/
    error_reporting(E_ALL);
 
/*
|---------------------------------------------------------------
| SYSTEM FOLDER NAME
|---------------------------------------------------------------
|
| This variable must contain the name of your "system" folder.
| Include the path if the folder is not in the same  directory
| as this file.
|
| NO TRAILING SLASH!
|
*/
    $system_folder = "system";
 
/*
|---------------------------------------------------------------
| APPLICATION FOLDER NAME
|---------------------------------------------------------------
|
| If you want this front controller to use a different "application"
| folder then the default one you can set its name here. The folder
| can also be renamed or relocated anywhere on your server.
| For more info please see the user guide:
| http://codeigniter.com/user_guide/gener ... _apps.html
|
|
| NO TRAILING SLASH!
|
*/
    $application_folder = "application";
 
/*
|===============================================================
| END OF USER CONFIGURABLE SETTINGS
|===============================================================
*/
 
 
/*
|---------------------------------------------------------------
| SET THE SERVER PATH
|---------------------------------------------------------------
|
| Let's attempt to determine the full-server path to the "system"
| folder in order to reduce the possibility of path problems.
| Note: We only attempt this if the user hasn't specified a
| full server path.
|
*/
if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
}
else
{
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\", "/", $system_folder);
}
 
/*
|---------------------------------------------------------------
| DEFINE APPLICATION CONSTANTS
|---------------------------------------------------------------
|
| EXT       - The file extension.  Typically ".php"
| FCPATH    - The full server path to THIS file
| SELF      - The name of THIS file (typically "index.php)
| BASEPATH  - The full server path to the "system" folder
| APPPATH   - The full server path to the "application" folder
|
*/
define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');
 
if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }
 
    define('APPPATH', BASEPATH.$application_folder.'/');
}
 
/*
|---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER
|---------------------------------------------------------------
|
| And away we go...
|
*/
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
 
/* End of file index.php */
/* Location: ./index.php */
  1. <?php
  2. /*
  3. |---------------------------------------------------------------
  4. | PHP ERROR REPORTING LEVEL
  5. |---------------------------------------------------------------
  6. |
  7. | By default CI runs with error reporting set to ALL.  For security
  8. | reasons you are encouraged to change this when your site goes live.
  9. | For more info visit:  http://www.php.net/error_reporting
  10. |
  11. */
  12.     error_reporting(E_ALL);
  13.  
  14. /*
  15. |---------------------------------------------------------------
  16. | SYSTEM FOLDER NAME
  17. |---------------------------------------------------------------
  18. |
  19. | This variable must contain the name of your "system" folder.
  20. | Include the path if the folder is not in the same  directory
  21. | as this file.
  22. |
  23. | NO TRAILING SLASH!
  24. |
  25. */
  26.     $system_folder = "system";
  27.  
  28. /*
  29. |---------------------------------------------------------------
  30. | APPLICATION FOLDER NAME
  31. |---------------------------------------------------------------
  32. |
  33. | If you want this front controller to use a different "application"
  34. | folder then the default one you can set its name here. The folder
  35. | can also be renamed or relocated anywhere on your server.
  36. | For more info please see the user guide:
  37. | http://codeigniter.com/user_guide/gener ... _apps.html
  38. |
  39. |
  40. | NO TRAILING SLASH!
  41. |
  42. */
  43.     $application_folder = "application";
  44.  
  45. /*
  46. |===============================================================
  47. | END OF USER CONFIGURABLE SETTINGS
  48. |===============================================================
  49. */
  50.  
  51.  
  52. /*
  53. |---------------------------------------------------------------
  54. | SET THE SERVER PATH
  55. |---------------------------------------------------------------
  56. |
  57. | Let's attempt to determine the full-server path to the "system"
  58. | folder in order to reduce the possibility of path problems.
  59. | Note: We only attempt this if the user hasn't specified a
  60. | full server path.
  61. |
  62. */
  63. if (strpos($system_folder, '/') === FALSE)
  64. {
  65.     if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
  66.     {
  67.         $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
  68.     }
  69. }
  70. else
  71. {
  72.     // Swap directory separators to Unix style for consistency
  73.     $system_folder = str_replace("\", "/", $system_folder);
  74. }
  75.  
  76. /*
  77. |---------------------------------------------------------------
  78. | DEFINE APPLICATION CONSTANTS
  79. |---------------------------------------------------------------
  80. |
  81. | EXT       - The file extension.  Typically ".php"
  82. | FCPATH    - The full server path to THIS file
  83. | SELF      - The name of THIS file (typically "index.php)
  84. | BASEPATH  - The full server path to the "system" folder
  85. | APPPATH   - The full server path to the "application" folder
  86. |
  87. */
  88. define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
  89. define('FCPATH', __FILE__);
  90. define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
  91. define('BASEPATH', $system_folder.'/');
  92.  
  93. if (is_dir($application_folder))
  94. {
  95.     define('APPPATH', $application_folder.'/');
  96. }
  97. else
  98. {
  99.     if ($application_folder == '')
  100.     {
  101.         $application_folder = 'application';
  102.     }
  103.  
  104.     define('APPPATH', BASEPATH.$application_folder.'/');
  105. }
  106.  
  107. /*
  108. |---------------------------------------------------------------
  109. | LOAD THE FRONT CONTROLLER
  110. |---------------------------------------------------------------
  111. |
  112. | And away we go...
  113. |
  114. */
  115. require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
  116.  
  117. /* End of file index.php */
  118. /* Location: ./index.php */


Thank you Bogey,

cgfx
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8397
  • Loc: USA

Post 3+ Months Ago

Which version of codeigniter do you have?

Check codeigniter/system/application/views/ directory... I may be wrong, considering what the guy did there. Check the codeigniter documentations.
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

Bogey,

Thank you for your time and I will get back with you ASAP.

cgfX

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 160 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.