MyBB Community Forums

Full Version: Cannot find codes in my .php file...why??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear all,
When I use my browser to view the page source of portal.php I can see the following codes:

<!-- start: nav -->
<div class="navigation">
<div class="home-button"><a href="http://www.xxxxxx.com/index.php" class="home">Go home</a></div><!-- start: nav_bit -->
<span class="nav-bit"><a href="http://www.xxxxx.com/index.php">XXXXXX</a></span> <span class="sep"> / </span>
<!-- end: nav_bit --><!-- start: nav_bit_active -->
<span class="active nav-bit">Portal</span>
<!-- end: nav_bit_active -->
</div>

However, when I download the portal.php via ftp from ./portal.php, and use an editor to see the codes in the file, and I couldn't find the codes above.

Why is that?

Pls advise. Thanks.
what you see on the page source in a browser is the html version of the webpage... while PHP is a server-side scripting language which is interpreted and executed by a PHP interpreter on the server. The server then sends resulting output to our browsers usually in the combination of html and css.

for ex. this piece of code would produce a output of the text "Good Morning!!"
<?php
echo "Good Morning!!";
?>

You need to know the basics of html,css,jscript and php to understand the workflow. http://www.w3schools.com would be good place to start with, if you would like to know about them...
(2014-07-26, 07:49 AM)hhppyy Wrote: [ -> ]Dear all,
When I use my browser to view the page source of portal.php I can see the following codes:

<!-- start: nav -->
<div class="navigation">
<div class="home-button"><a href="http://www.xxxxxx.com/index.php" class="home">Go home</a></div><!-- start: nav_bit -->
<span class="nav-bit"><a href="http://www.xxxxx.com/index.php">XXXXXX</a></span> <span class="sep"> / </span>
<!-- end: nav_bit --><!-- start: nav_bit_active -->
<span class="active nav-bit">Portal</span>
<!-- end: nav_bit_active -->
</div>

However, when I download the portal.php via ftp from ./portal.php, and use an editor to see the codes in the file, and I couldn't find the codes above.

Why is that?

Pls advise. Thanks.

Those variables are placed in the templates go to admincp->themes &styles->templates->theme->navigation templates and you will find it in the relevant nav template.

note '->' = mouse click