Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to Php

Status
Not open for further replies.

cmz21

Programmer
May 5, 2005
110
US
Hello,
I am very new to php and just trying to get a handle on some ideas. I'm not even sure if this question makes sense. Is there a way that I can view the php code that is being run when I log into a web page?
I am trying to figure out how some pages are working, but when I open the source, all that I see is the html.

Any input would be greatly appreciated.
Sorry if this is a really bad question.


cmz
 
You must keep in mind that PHP runs on the server, not on your web client. This means that when you perform "view source" on a PHP-generated web page, the only thing that has been transmitted to the browser is the HTML which produces the page.

If you are trying to see how someone else does something, short of contacting the owner of the site and asking to see source code, you are out of luck.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Cmz21,

As Slepnir214 has said the code runs server side.
However, a common coding technique is to place echo calls before and after a statement to see whether variables and methods are executing correctly.

Code:
[blue]
$myVar = "Foo";

echo $myVar;  [green]//Produces... Foo[/green]

$myVar+="Bar";

echo $myVar;  [green]//Produces... FooBar[/green]

[green]//You have now verified the middle step worked[/green]
[/blue]

Hope that helps,
~Ron

typedef map<GiantX,gold, less<std::shortestpathtogold> > AwesomeMap;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top