PHP programming is the quickest (first speaking software environment and preparation work)

Source: Internet
Author: User
Tags php file php server php code php programming domain name dreamweaver
Download installation can be used, such a large number of integrated development environment, if you have installed according to other books php+mysql development environment, debugging will not have to change. I am renting space, local debugging is okay, the effect is the same.

The code writing software I use is Dreamweaver. To tell you the truth, I only use its code highlighting and CSS features, all of the code is hand-written. You can use Notepad or Zend Studio, and so on (but don't blame me if you have a problem, because you can also see my tutorials and programs in LUnix, and even study on a spaceship if you don't violate the purpose of my writing this book.) )

FTP Upload tool can be used: FLASHFXP and so on. These are the things that the Script House website has.

PHP file I use UTF-8 encoding, the advantage is internationalization, the code coupling between functions well, more than GB2312 advantages. You can use GB2312 words, but this book individual two or three functions you have to work around, involving files, databases, URLs and so on.

The head of PHP has this line:
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
You can change the page encoding to Utf-8 by Dreamweaver menu: Modify-page Properties (this is the default).
Hello World Program This book is not available, use this example instead:
The main use of Hello world is PHP's output content function.
<?php
echo "Hello World";
?>
Instance 1: Output values from 1 to 100
Copy CodeThe code is as follows:
<?php//PHP code begins to end the identity, equivalent to ASP's <%
The following output values from 1 to 100
for ($i = 0; $i < $i + +)//loop statement as in other languages, a variable has a $ identity before it, and all variables are not required to be declared.
{
Echo $i. "\ r \ n";
/**
* Output to the screen with the Echo keyword,. The connector corresponds to the C language +.
* Double quotes, escapes and other languages, the use of single quotes instead of double quotes can not achieve the effect of the line, we could try.
*/
}
?>

Save the above code as a *.php file and place it in the PHP server directory with the browser to open the path (such as: http://localhost/index.php).
Of course, to publish a website to the network you also need to apply for a domain name and space, this is not said.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.