PHP environment construction and entry

In the php file, write header('content-type:text/html;charset = uft-8');

<?php
    header('content-type:text/html;charset=utf-8');
    echo"hello world 中文";
     function sum($a,$b){
        return '<div style = "color : red">'.($a+$b).'</div>';
    }
echo    sum(1,2);
?>

Put the written php file in the www directory to display the loading.
When previewing the local file, enter the 127.0.0.1/php file in the browser; it can be loaded, or enter the localhost:80/php file in the browser;
modify the port, left-click on httpd:conf in Apache under wamp operation, and query listen port is modified. Anything with # is a comment. Restart all services is required after modification.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324822097&siteId=291194637