2016-04-05 2016 Chinese New Year is a few months. 2016 Monkey Qingming Festival holiday arrangement 2016

Source: Internet
Author: User
Tags multisite
Data-id= "1190000004873405" >

Application areas of PHP

    1. Web server-side scripting: the main role

    2. Application graphical interface

    3. Command-line scripting
      php.exe -f "php文件路径"Orphp.exe -r "php脚本代码"

Installing Apache

Open the installer all the way next

Install PHP

Unzip the PHP package into a directory in the system

Install MySQL

The default option is all the way next.

Configuring Apache and PHP

    1. Open Apache httpd.conf file to add the following
      LoadModule php5_module "php解压目录中找到 php5apache2_2.dll的路径"

    2. Add the following content
      AddType application/x-httpd-php .php .pap .phtml

    3. Detecting Apache Configuration syntax
      httpd.exe -t

PHP Configuration Time Zone

    1. Open PHP Unzip directory to find php.ini file

    2. Find keywords timezone and uncomment to change todate.timezone = PRC

    3. To set the php.ini file path in httpd.conf
      PHPIniDir 'php解压目录'

    4. Restart Apache

PHP configuration MySQL

    1. Find Uncomment in php.ini extension_dir

    2. Find a comment that cancels php_mysql.dll a comment at the same time in php.ini mysqli.dll

Apache Host Configuration

    1. Directory Access Permission Description


  
   
    
   #设置当一个请求中没有给定请求的文件名又没有默认网页(首页)的时候,显示文件列表Options  Indexes    #设置权限控制的先后顺序,只有2种:Deny,Allow(先拒绝,后允许),Allow,Deny(先允许后拒绝)Order  Deny,Allow#Deny用于设定要拒绝访问的来源地址或服务器名,几乎没有实际意义!Deny  from  拒绝名单  比如:deny  from  192.168.3.8  172.180.4Allow  from 允许名单   比如:Allow  from  all#设置该文件夹下的“默认网页”(首页),可以设置多个,用于请求中不带文件名的时候自动使用该文件作为“返回”页面。DirectoryIndex  index.php  index.html   main.php  default.php   abc.php   123.html# 允许分布权限AllowOverride all
  
   
    1. Distribution permissions are the permissions to set the folder individually without restarting Apache. Create a new. htaccess file in a folder that requires separate configuration permissions, as follows

Deny from all

Apache Virtual Host Configuration

    1. In the Apache Master Profile httpd.conf, open the multisite Virtual host profile entry (keyword: vhosts):

    2. In the httpd-vhosts.conf file, set the IP address and port number that you want to provide the "multisite" service, usually by default:: 80, where "" means all IPs, the default is actually Apache installed after the set up, No manual setup required (keyword Namevirtualhost):

    3. Configure each individual site


  
   
    
   #主机名ServerName www.baidu.com#主机别名ServerAlias map.baidu.com tv.baidu.com#目录DocumentRoot "C:/root"#目录权限配置
   
    
     
         Options Indexes     Order Deny,Allow     Allow from all
   
    #虚拟目录Alias /abc 'C:/alias'
   
    
     
         Options Indexes     Order Deny,Allow     Allow from all
   
    
  
   

The above describes the 2016-04-05, including 2016 aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.