zoukankan      html  css  js  c++  java
  • 008——php字符串中的处理函数(七)

    <?php
    /**
     *字符串处理函数(六)get_magic_quotes_runtime set_magic_quotes_runtime strip_tags
     *get_magic_quotes_runtime()  获得外部文件及数据库资料时是否进行转义
     * set_magic_quotes_runtime(1); 设置获得外部文件及数据资料时是否进行转义
     *
     * strip_tags()去除html.xml中的标签
     *
     * phpinfo();
     */
    
    
    
    //echo "<br/>";
    //$mysqli=new mysqli('localhost','root','','edu');
    //$mysqli->query('set names gbk');
    //$sql="select * from user";
    //$result=$mysqli->query($sql);
    //while ($row=$result->fetch_assoc()){
    //    echo "<pre>";
    //    print_r($row);
    //}
    //$file = fopen('28_1.txt',r);
    //$con = fread($file, filesize('28_1.txt'));
    //echo $con;
    
    $str="<div style='background-color: aquamarine; height: 50px;  300px;'>
    <span style='color: blueviolet'>百度网</span><b>PHP课程</b>
    </div>";
    echo $str;
    echo strip_tags($str,'<span>');
    

      

  • 相关阅读:
    hdu-4638
    一个简单的询问
    CoderForces-617B
    HYSBZ-2002弹飞绵羊
    邻接表
    CoderForces-913-C
    CoderForces-913D
    CoderFocers-620C
    CoderForces-375D
    HDU-6119
  • 原文地址:https://www.cnblogs.com/yiweiyihang/p/7776372.html
Copyright © 2011-2022 走看看