downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

PHP とはなんでしょう?> <はじめに
Last updated: Fri, 06 Nov 2009

view this page in

入門

目次



PHP とはなんでしょう?> <はじめに
Last updated: Fri, 06 Nov 2009
 
add a note add a note User Contributed Notes
入門
nostamar $AT$ g mail
30-Jan-2008 12:06
here is a "server-php >> html >> browser" process illustration:
http://www.lastown.com/forum/viewtopic.php?t=533

it shows the basic steps; first php code is parsed at server into html; then sent to browser, that understands html tags and renders them to the display the webpage, there's also some quick overview about the process.. worths taking a look at
winks716
19-Aug-2007 02:48
before html runs to show a webpage, php code runs first on web server.

so, when there lines as follow:

<table>
<tr>
<td>
  <?php
   
echo "php runs first!";
 
?>
</td>
</tr>
</table>

the first step is to run php code, we get:

<table>
<tr>
<td>
php runs first
</td>
</tr>
</table>

then, code is sent to browser, and we see somthing~
george dot langley at shaw dot ca
19-Jul-2007 12:02
"the code is executed on the server"

This is an important concept for the first-time PHP programmer to understand, so that when you get into string formatting later on, you understand the difference between formatting the on-screen content (as parsed by your browser) and formatting the HTML code (as returned by the server).
For example "\n" starts a new line in the HTML code, and its results are only seen if you look at the "source HTML". It is NOT the same as <br>!

[EDIT BY danbrown AT php DOT net:  Corrected typo in post.  Thanks to PHP at ANDY dot COM dot PT for pointing out the issue.]

PHP とはなんでしょう?> <はじめに
Last updated: Fri, 06 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites