- CouchDB and PHP Web Development Beginner’s Guide
- Tim Juravich
- 230字
- 2021-08-13 18:22:50
Time for action — creating a quick info page
We are going to double-check that Apache can render PHP scripts by quickly creating a phpinfo
page that will display a wide array of data about your configuration.
- Open your text editor.
- Create a new file that contains the following code:
<?php phpinfo(); ?>
- Save the file with the name,
info.php
, and save that file in the following location:/Library/WebServer/Documents/info.php
. - Open your browser.
- Navigate your browser to
http://localhost/info.php
. - Your browser will display the following page:
What just happened?
We used our text editor to create a file called info.php
that contained a special PHP function called phpinfo
. We saved the info.php
file into the folder: /Library/Webserver/Documents
. This folder is the default location (in Mac OS X only) for all of the files that your Apache service will display. When your browser hit the info.php
page, the phpinfo
looked at your PHP installation and returned an HTML file with details about your configuration. You can tell that there is a lot going on here. Feel free to poke around and look at some of the information before we move on.
Fine tuning Apache
We finally have our basic web development environment set up. However there are a few things we'll need to adjust in Apache in order for us to build our application; the first of which is enabling a great built-in module called mod_rewrite
.
- Python機(jī)器學(xué)習(xí):數(shù)據(jù)分析與評(píng)分卡建模(微課版)
- Docker進(jìn)階與實(shí)戰(zhàn)
- 自己動(dòng)手寫Java虛擬機(jī)
- FreeSWITCH 1.6 Cookbook
- Getting Started with CreateJS
- iOS開(kāi)發(fā)實(shí)戰(zhàn):從零基礎(chǔ)到App Store上架
- 網(wǎng)店設(shè)計(jì)看這本就夠了
- PLC編程及應(yīng)用實(shí)戰(zhàn)
- C語(yǔ)言程序設(shè)計(jì)教程
- Getting Started with React Native
- Java程序員面試筆試寶典(第2版)
- 零基礎(chǔ)學(xué)Python編程(少兒趣味版)
- 從零開(kāi)始學(xué)Android開(kāi)發(fā)
- Ext JS 4 Plugin and Extension Development
- 深度學(xué)習(xí)入門:基于Python的理論與實(shí)現(xiàn)