Skip to main content

Building your website locally by PHPstudy

Introduction

After two weeks of study, I finally finished studying the front-end (HTML5, JavaScript) part of the web and the back-end (PHP, MySQL) part. Through this period of study, I can already independently create a login and registration page and submit its content to the MySQL database. Below, I will introduce in detail the whole process of how I built the login and registration pages.

N.B. The domain name www.terry906.top in the watermark of screenshots formly belonged to me, so these screenshots were not copied from others!

Text

Preparation

For rookies, I do not recommend renting or purchasing a virtual host (VPS) to practice building a website, because the building environment is complicated and difficult for rookies to understand. We can download an out-of-the-box software called PHPstudy on the computer to build a local website, deploy the WAMP (Windows+Apache+MySQL+PHP) environment within one click, and use virtual domain names to simulate the website environment.

First, we go to the PHPstudy official website to download the small skin panel. After the download is complete, click the "Start" button next to WAMP to install the relevant environment. After the installation is complete, click "Website" (网站 in Chinese) on the left sidebar.


Then fill in the URL starting with www in "Domain Name" (域名 in Chinese). Here we take www.test.com as an example. After filling in the URL, tick "Create Database" (创建数据库 in Chinese) and set the account (用户名 in Chinese) and password (密码 in Chinese).



After all these are done, go to the "phpstudy_pro" folder on your computer, find the folder named with the customized domain name under the "WWW" subfolder, and copy the created web page folder into it. I will talk about the login and registration process in detail later.


Double-click the "Physical Path" (物理路径 in Chinese) under PHPstudy "Website" (网站 in Chinese) and select the copied web page folder. Note that one of the web page files must be index.html, otherwise you need to change the "Website Home Page" (网站首页 in Chinese) in "Modify" (修改 in Chinese) of "Management" (管理 in Chinese) to see the web page you created.


Go to "Software Management" (软件管理 in Chinese) to download and install the database management tool sqlfront. It is recommended for rookies to use this because it is a graphical interface. Of course, you can also choose to use Navicat, but the genuine version requires subscription, which is not cheap in Chinese Yuan.


Once logged in, click "Create" (新建 in Chinese) to create a login.


Fill in the default local IP address 127.0.0.1 in the "host" column, and then select the database you just created below.


After opening, double-click the database you just created, move the cursor to it and right-click "Create" (新建 in Chinese) - "Table" (表格 in Chinese), the following window will pop up.


Follow the example above and create corresponding fields to store data.


At this point, the preparation of the database is completed. Next, I will detail the process of writing the source code for the login and registration pages in the next post.

SQLfront error message

During the process of creating a MySQL database, I encountered some unexpected situations. For example, error number 1055 in the picture below.


Solution: Find the folder corresponding to MySQL in the "Extensions" subdirectory of the "PHPstudy_pro" folder, and use Notepad to open the my.ini file inside.


Add the statement in the box below [mysqld], save and restart PHPstudy.


Re-enter SQLfront, and the error message disappears!

Conclusion

Thank you all for your patience in reading. If you have any questions, please leave it at the comment area below.

Comments

Popular posts from this blog

Ways to bypass GFW as a foreigner in Mainland China

I'm surprised to find out there are very few tutorials for westerners living in Mainland China to bypass the Great Firewall built by CCP. Maybe you come to Mainland China due to multiple reasons, such as academic communication,work or live here. However, popular VPN providers like ExpressVPN,NordVPN and surfshark can't work very well here. The VPN traffic and socks5 proxy traffic has already been precisely detected and blocked by GFW for ages. Now, I will introduce some new techniques for you to bypass GFW: Consider using proxy servers running advanced proxy protocols such as Vmess,ShadowSocks and Trojan rather than VPN servers. These protocols are based on socks5 protocol which locates at the application layer of OSI model, and their performance are much greater than VPN protocols. You can buy those services from proxy providers("机场" in Chinese). They provide servers("节点" in Chinese) in multiple locations, even all over the world. Quality of service and loc

Welcome to my blog!

This is the English version of my tech blog. However, as a student, I'm busy with my study and don't have enough time to translate my blogs into English. Sorry for the inconvenience! The link of my Chinese version tech blog is:  https://hackerterry.netlify.app

Enabling Intranet access to Synology DSM through domain name for Merlin firmware routers

Introduction I recently bought a Synology NAS, a DS218play machine that has been discontinued (due to lack of money), and started a long process of tinkering with it. Because I have been living on campus for a long time, I wanted to access the Synology NAS at home through the domain name to implement various functions, such as mapping disks on the external network.  However, due to the NAT loopback restriction set by the network providers in China, I later found that I cannot access the Synology NAS using the domain name in the Intranet of my home. After a long period of exploration, I finally succeeded! Here I will share with you the specific method, which can be achieved without putty or secureCRT. Text First download the WinSCP software online, as shown in the figure after downloading and installing. Select the SCP protocol. The host name is the IP of your router's management page. The username and password are the same as those used to log in to the routing management page. Jus