Blogger Information
Blog 35
fans 0
comment 0
visits 32604
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP环境配置与基础语法-2018-8-24
THPHP
Original
689 people have browsed it

变量命名规格:

IMG_20180824_231958.jpg

web访问原理:

1.jpg

本地域名主机创建:

1.jpg

基础语法:

实例

<?php
    header('content-type:text/html;charset=utf-8');
    $name = '钱';
    $meiyuan = '$';
    $nameN = '你有什么?';
    echo $nameN . ',我有很多很多的'.$name; // 单引号的变量解析
    echo '<br>';
    echo $nameN . "我有很多很多的{$name}";// 双引号的变量解析
    echo '<br>';
    echo $nameN . "我有很多很多的\\\$";// 转义符 \  输出结果: \ $
    echo '<br>';
// 如果变量是在html嵌套,不用 {}括起来就会报错
    echo <<< HEREDOC
   {$nameN}我有很多很多的{$meiyuan};
HEREDOC;
    echo '<br>';
    echo <<< NOWDOC
    <h1>{$nameN}我有很多很多的{$meiyuan}; </h1>
NOWDOC;

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post