Basic PHP Consolidation

Source: Internet
Author: User

    • Customizing the PHP development Environment Installation

  

    1. Apache Install, httpd-k install, then configure

      httpd.conf C:/apache24 changed into C:/tnwamp/apache24
      ServerName localhost 80

    2. PHP Configuration

Apache httpd.conf in the increase
#PHP-module

LoadModule php5_module "D:/tnwamp/php56/php5apache2_4.dll"
<filesmatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Phpinidir "d:/tnwamp/php56/"

In php.ini
Extension_dir = "D:/tnwamp/php56/ext"

Can write a test.php <?php phpinfo ();?> test

3.mysql Configuration

In php.ini
Extension=php_bz2.dll
Extension=php_gd2.dll
Extension=php_mysql.dll
Extension=php_mysqli.dll

<?php [email protected]_connect ("localhost", "root", "" ");
if ($test) {echo ' OK ';} Else{echo ' no OK ';}?>

4. Other

phpMyAdmin

Ini

Extension=php_mbstring.dll

Modify the MySQL root password

Set password for [email protected]=password (' 000000 ');

Start MySQL
net start MySQL
net stop MySQL
Connect to MySQL
Mysql-u root-p
Database backup
mysqldump-uroot-p000000 Animal>d:/animal.sql
Restoring a Database
Create a database first and select it
SOURCE D:/tntest.sql

  

If we want to know that our httpd.conf has no errors without restarting Apache , you can use httpd-t to detect

    • PHP Command mode

Php.exe-r "Echo ' hello ';";

Php.exe-f "d:/a.php"

    • Grammar

  Basic data type : integer (int/integer), float ( float/double), boolean (bool/ Boolean), strings (String)

Composite data Types : arrays (array), objects (object)

Special data type : null (NULL), resource (Resource)

  

  

    • Coercion of data types

SetType ( variable , data type )

  

  

Basic PHP Consolidation

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.