Experiment 1 Web Development Basics

Experiment 1 Web development basics

1. Experimental hours

2 hours

2. Experimental purpose

1. Familiar with the editing environment of PHP programs

2. Familiar with the testing environment of PHP web applications

3. Understand the basic structure and operating principles of PHP web applications

4. Master the structure and composition of Web pages

5. Master the functions and attributes of common HTML tags

3. Experimental equipment

PC computer, equipped with Win10 operating system, Word2019, PHPStudy+eclipse for php

4.Experimental content and procedures

( 1 )Experimental content

Implement the interface shown in the figure below.

(2) Experimental steps

1. Install phpstudy :

Unzip the compressed package and double-click the installation .exe file. It is installed on the D drive by default. After the installation is completed, a folder named phpstudy_pro will be generated on the D drive.

2. Configure phpstudy :

Figure 1 Configuring phpstudy

3.Install phpmyadmin _

If you cannot find phpmyadmin in the software management office, the possible reason is that the phpstudy software needs to be updated. Click Update when opening the software and wait a few seconds for it to be completed.

Another problem is that the website status has expired, as shown in Figure 2. At this time we need to manage->modify->expiry time (modify at will). After the modification is completed, the website status will change from expired to normal, and then you can go Download phpmyadmin, as shown in Figure 3.

Figure 2 Website status

Figure 3 phpmyadmin download

4. Unzip eclipse for php

If jdk has been installed and configured on the machine, double-click to open eclipse and select the workspace, as shown in Figure 4

Figure 4 Start eclipse and select the workspace

5. Code writing:

In the WWW directory of phpstudy_pro, create a new helloworld.php file, open the file with eclipse, and write the code

<?php 
	echo "hello world!"
?>

6. Running results:

Go to your browser and type in the address bar

http://localhost/helloworld.php, you can access helloworld.php, as shown in Figure 5

 

Figure 5 Result display

5. Experiment summary and experience

Question discussion:

How to install and configure the development environment?

After unzipping the phpstudy compressed package, double-click the installation .exe file. After installation, open the software and configure the Apache server and MySQL database. Then install eclipse for php. If the computer has been configured with jdk, double-click to open eclipse, set the workspace to phpstudy_pro/WWW, and the configuration is completed.

 

Experimental experience :

  1. Unable to download phpmyadmin, it may be because the software has not been updated.
  2. After downloading, phpmyadmin cannot log in. It may be that the password is entered incorrectly.
  3. This experiment is not difficult. It mainly involves familiarizing yourself with the configuration and use of phpstudy and the use of eclipse for php software.

This experiment is relatively simple. It is uploaded purely to record the first experiment of my PHP course. Criticisms and corrections are welcome!

Guess you like

Origin blog.csdn.net/pzcxl/article/details/127043485