PHP programming is the fastest way to understand (first talk about the software environment and preparation) _ PHP Tutorial

Source: Internet
Author: User
PHP programming is the fastest way to understand (first, about the software environment and preparation ). You can use it after downloading and installing it. there are many such integrated development environments. if you have installed the PHP + Mysql development environment according to other books, you do not need to change it after debugging. I rented a space and can use it after local download and installation. There are many such integrated development environments. if you have installed the PHP + Mysql development environment according to other books, after debugging, you do not need to change it. I rented a space, so it's okay to debug locally. The effect is the same.

The software I used to write code is dreamweaver. To be honest, I only use the code highlighting and CSS functions, and all the code is manually written. You can use notepad or Zend Studio (but don't blame me if you have any problems, because you can also view my tutorials and programming in LUNIX, or even study on a spaceship, the premise is not to violate the purpose of writing this book .)

You can use the ftp upload tool, such as FlashFXP. These things are available on the script home website.

Php files I use UTF-8 encoding, the advantage is that the code between functions is well coupled, better than GB2312. You can also use GB2312, but there are two or three functions in this book that you need to work with, involving files, databases, URLs, and so on.

PHP head has such a line:

You can use the dreamweaver menu to modify the -- Page attribute and change the page encoding to UTF-8 (this is the default value ).
The Hello world program book is not provided. use this example instead:
Hello world actually uses php output content functions.
Echo "Hello world ";
?>
Instance 1: output values from 1 to 100

The code is as follows:


// Output values from 1 to 100 below
For ($ I = 0; $ I <100; $ I ++) // The loop statement is the same as that in other languages. $ ID is added before the variable, in addition, all variables do not need to be declared.
{
Echo $ I. "\ r \ n ";
/**
* The echo keyword is used for output to the screen. the. Connector is equivalent to the C language +.
* Double quotation marks ("double quotation marks") cannot be used in the same way as other languages. you can try it.
*/
}
?>


Save the above code as a *. PHP file and place it in the php server directory. open the path in a browser (for example, http: // localhost/index. PHP.
Of course, to publish a website to the Internet, you still need to apply for a domain name and space.

Bytes. I am renting a space, local...

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.