PDA

View Full Version : how does php work?


nickyfraggle
08-16-2006, 07:13 PM
Hello,

I'm pretty new to programming. I've been doing some php on a few websites of mine, and was wondering if anyone could be kind enough to explain how my browser actually handles php. I've been told things like...php is less search engine friendly than html files etc. but without knowing how it works I don't know why this might be true.

Basically what I've gathered so far, is that php is server side..that it is 'translated' at the server end, before it reaches my browser. By the time it gets to me it's been turned into html right? So no-one looking at the site online can actually see any of my php code.

I'd really appreciate your help..any online articles you think might be handy, or maybe you'd like to explain yourself?

Thank a lot!

Nicky

Fumigator
08-16-2006, 07:19 PM
Basically what I've gathered so far, is that php is server side..that it is 'translated' at the server end, before it reaches my browser. By the time it gets to me it's been turned into html right? So no-one looking at the site online can actually see any of my php code.

That's right. And as such, isn't comparable to HTML.

You have the overhead of PHP processing all the code between the <? ?> tags, but typically this is minimal overhead.

In terms of your original question, here's a good place to start:

http://us3.php.net/manual/en/introduction.php

And, as always, Google is your friend :)

Mwnciau
08-16-2006, 07:20 PM
http://www.hypermedic.com/php/phpeng1.gif

Basically, PHP just get turned into html (or can be turned into an image) as you said, thats all the user can see.

Beagle
08-17-2006, 03:47 PM
And therefore, it is not less search engine friendly

umal
08-18-2006, 02:27 AM
But we cab make php search engine frendly. I sugest you to visit http://www.erasoftonline.com and go to php section http://www.erasoftonline.com/erasoftonline/modules/BestFreePhpBooks/ and linux section http://www.erasoftonline.com/erasoftonline/modules/BestLinuxBooks/ (http://www.erasoftonline.com/erasoftonline/modules/BestLinuxBooks/)

marek_mar
08-18-2006, 04:12 AM
Please treat PHP as "PHP: Hypertext Preprocessor" and not as "Personal Home Page".
PHP does not turn itself into HTML.
PHP is a language designed for web-developement or such are PHP's roots. It can be used for other thins but in general it isn't.
PHP can take a set of arguments (Querystring, POST data etc.) and output some other data (usually HTML) which ios hopefully what the user expects. :)

Serach engine friendlyiness hass nothing to do with PHP directly. Having querystrings in URL's is thought by some to be search engine un-friendly but it is, already for a long time, not true.