Giải pháp thiết kế web động với PHP - p 4
Số trang: 10
Loại file: pdf
Dung lượng: 705.28 KB
Lượt xem: 17
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
GETTING READY TO WORK WITH PHP
You don t need any special equipment. A web server is a piece of software that displays web pages, not a separate computer. As long as you have at least 1GB of free disk space, you should be able to install all the software on your computer—even one with modest specifications.
If you already have a PHP test environment on your local computer, there s no need to reinstall. Just check the section at the end of the chapter titled “Checking your PHP (Windows and Mac).”
Individual programs or an all-in-one package?
For many years, I advocated installing...
Nội dung trích xuất từ tài liệu:
Giải pháp thiết kế web động với PHP - p 4 GETTING READY TO WORK WITH PHP You don t need any special equipment. A web server is a piece of software that displays web pages, not a separate computer. As long as you have at least 1GB of free disk space, you should be able to install all the software on your computer—even one with modest specifications. If you already have a PHP test environment on your local computer, there s no need to reinstall. Just check the section at the end of the chapter titled “Checking your PHP (Windows and Mac).” Individual programs or an all-in-one package? For many years, I advocated installing each component of a PHP testing environment separately, rather than using a package that installs Apache, PHP, MySQL, and phpMyAdmin automatically in a single operation. My advice was based on the dubious quality of some early all-in-one packages, which installed easily but were next to impossible to uninstall or upgrade. The all-in-one packages currently available are excellent, and I have no hesitation in recommending them. On my computers, I use XAMPP for Windows (www.apachefriends.org/en/xampp-windows.html) and MAMP for Mac OS X (www.mamp.info/en/ mamp/index.html). Setting up a PHP testing environment with an all-in-one package is normally trouble free. The main cause of difficulty is a conflict with another program using port 80, which Apache and IIS use to listen for page requests. If Skype is installed, go to the Advanced section of Skype Preferences, and make sure it s not using port 80. Try 42815 as the incoming port instead. Setting up on Windows These instructions have been tested on Windows 7, Windows Vista, and Windows XP. Make sure that you re logged on as an Administrator before proceeding. Getting Windows to display filename extensions By default, most Windows computers hide the three- or four-letter filename extension, such as .doc or .html, so all you see in dialog boxes and Windows Explorer is thisfile instead of thisfile.doc or thisfile.html. The ability to see these filename extensions is essential for working with PHP. Use these instructions to enable the display of filename extensions in Windows 7 and Windows Vista: 1. Open Start Computer. 2. Select Organize Folder and Search Options. 3. In the dialog box that opens, select the View tab. 4. In the Advanced se ttings section, uncheck the box marked Hide e x tensions for known file types. 5. Click OK. 11 CHAPTER 2 Use these instructions in Windows XP: 1. Open Start My Computer. 2. Select Tools Folder Options. 3. In the dialog box that opens, select the View tab. 4. Uncheck the box marked Hide e x tensions for known file types. 5. Click OK. I recommend that you leave your computer at this setting because it is more secure—you can tell if a virus writer has attached an .exe or .scr executable file to an innocent-looking document. Choosing a web server Most PHP installations run on the Apache web server. Both are open source and work well together. However, Windows has its own web server, Internet Information Services (IIS), which also supports PHP. In fact, Microsoft has worked closely with the PHP development team to improve the performance of PHP Download from Wow! eBook on IIS to roughly the same level as Apache. So, which should you choose? The answer depends on whether you develop web pages using ASP or ASP.NET, or intend to do so. ASP and ASP.NET require IIS. You can install Apache on the same computer as IIS, but they both listen for requests on port 80. You can t run both servers simultaneously on the same port. Unless you need IIS for ASP or ASP.NET, I recommend that you install Apache, using XAMPP or one of the other popular all-in-one packages, as described in the next section. For instructions on how to install PHP in IIS, skip ahead to “Installing PHP with the Microsoft Web Platform Installer.” Installing XAMPP on Windows XAMPP installs Apache, PHP, MySQL, phpMyAdmin, and several other tools on your computer in a single operation. Apart from the time it takes to download, the installation process normally takes less than five minutes. Once it has been installed, you need to change a few settings, but most changes can be made through a web interface. XAMPP isn t the only all-in-one package. Two others are WampServer (www.wampserver.com/en/) and EasyPHP (www.easyph ...
Nội dung trích xuất từ tài liệu:
Giải pháp thiết kế web động với PHP - p 4 GETTING READY TO WORK WITH PHP You don t need any special equipment. A web server is a piece of software that displays web pages, not a separate computer. As long as you have at least 1GB of free disk space, you should be able to install all the software on your computer—even one with modest specifications. If you already have a PHP test environment on your local computer, there s no need to reinstall. Just check the section at the end of the chapter titled “Checking your PHP (Windows and Mac).” Individual programs or an all-in-one package? For many years, I advocated installing each component of a PHP testing environment separately, rather than using a package that installs Apache, PHP, MySQL, and phpMyAdmin automatically in a single operation. My advice was based on the dubious quality of some early all-in-one packages, which installed easily but were next to impossible to uninstall or upgrade. The all-in-one packages currently available are excellent, and I have no hesitation in recommending them. On my computers, I use XAMPP for Windows (www.apachefriends.org/en/xampp-windows.html) and MAMP for Mac OS X (www.mamp.info/en/ mamp/index.html). Setting up a PHP testing environment with an all-in-one package is normally trouble free. The main cause of difficulty is a conflict with another program using port 80, which Apache and IIS use to listen for page requests. If Skype is installed, go to the Advanced section of Skype Preferences, and make sure it s not using port 80. Try 42815 as the incoming port instead. Setting up on Windows These instructions have been tested on Windows 7, Windows Vista, and Windows XP. Make sure that you re logged on as an Administrator before proceeding. Getting Windows to display filename extensions By default, most Windows computers hide the three- or four-letter filename extension, such as .doc or .html, so all you see in dialog boxes and Windows Explorer is thisfile instead of thisfile.doc or thisfile.html. The ability to see these filename extensions is essential for working with PHP. Use these instructions to enable the display of filename extensions in Windows 7 and Windows Vista: 1. Open Start Computer. 2. Select Organize Folder and Search Options. 3. In the dialog box that opens, select the View tab. 4. In the Advanced se ttings section, uncheck the box marked Hide e x tensions for known file types. 5. Click OK. 11 CHAPTER 2 Use these instructions in Windows XP: 1. Open Start My Computer. 2. Select Tools Folder Options. 3. In the dialog box that opens, select the View tab. 4. Uncheck the box marked Hide e x tensions for known file types. 5. Click OK. I recommend that you leave your computer at this setting because it is more secure—you can tell if a virus writer has attached an .exe or .scr executable file to an innocent-looking document. Choosing a web server Most PHP installations run on the Apache web server. Both are open source and work well together. However, Windows has its own web server, Internet Information Services (IIS), which also supports PHP. In fact, Microsoft has worked closely with the PHP development team to improve the performance of PHP Download from Wow! eBook on IIS to roughly the same level as Apache. So, which should you choose? The answer depends on whether you develop web pages using ASP or ASP.NET, or intend to do so. ASP and ASP.NET require IIS. You can install Apache on the same computer as IIS, but they both listen for requests on port 80. You can t run both servers simultaneously on the same port. Unless you need IIS for ASP or ASP.NET, I recommend that you install Apache, using XAMPP or one of the other popular all-in-one packages, as described in the next section. For instructions on how to install PHP in IIS, skip ahead to “Installing PHP with the Microsoft Web Platform Installer.” Installing XAMPP on Windows XAMPP installs Apache, PHP, MySQL, phpMyAdmin, and several other tools on your computer in a single operation. Apart from the time it takes to download, the installation process normally takes less than five minutes. Once it has been installed, you need to change a few settings, but most changes can be made through a web interface. XAMPP isn t the only all-in-one package. Two others are WampServer (www.wampserver.com/en/) and EasyPHP (www.easyph ...
Tìm kiếm theo từ khóa liên quan:
lập trình web giáo trình php thiết kế web với php tự học php lập trình php lập trình web giáo trình php thiết kế web với php tự học php lập trình phpGợi ý tài liệu liên quan:
-
[Thảo luận] Học PHP như thế nào khi bạn chưa biết gì về lập trình?
5 trang 131 0 0 -
161 trang 130 1 0
-
Bài giảng Lập trình web nâng cao: Chương 8 - Trường ĐH Văn Hiến
36 trang 116 1 0 -
MỘT SỐ ĐIỂM CẦN CHÚ Ý KHI THIẾT KẾ WEB
5 trang 111 0 0 -
GIÁO TRÌNH LẬP TRÌNH WEB_PHẦN 2_BÀI 3
3 trang 103 0 0 -
Lập Trình Web: Các trang quản trị trong PHP - GV: Trần Đình Nghĩa
8 trang 99 0 0 -
231 trang 92 1 0
-
101 trang 91 2 0
-
Bài giảng Lập trình web nâng cao: Chương 7 - Trường ĐH Văn Hiến
16 trang 66 1 0 -
Bài giảng Lập trình Web ASP.Net với C#: Chương 9 - Th.S Phạm Đào Minh Vũ
55 trang 50 0 0