• HTML一些有趣的东西


    1、<head>标签里:

    <meta http-equiv="Refresh" content="3"/><!--三秒自动刷新-->

    <meta http-equiv="Refresh" content="3;Url=http://www.baidu.com"/><!--三秒自动跳转网站-->

    <meta name="Keywords" content="东小东,东小东啦啦,东小东很气愤,东小东要努力"/><!--关键字搜索,百度检索就找此-->


    <meta name="Description" content="东小东是一个不怎么样的孩子,但他很不努力,所以一事无成,一无所有,一败涂地,哈哈"/><!--摘要,描述-->

    <link rel="shortcut icon" type="image/jpg" href="img/2.jpg" /><!--title的小图标    type可有多种值 gif/jpg/png/ico等 -->

    <!--画一条横线--><hr>

     页面内容不可被选中(不可扩选复制)

    body{
        -webkit-user-select:none;
        -moz-user-select:none;
        -ms-user-select:none;
        user-select:none;
    }    

    2、小小程序,PHP实现文件上传一体化实现程序,页面要提交简单验证码以示用户身份,保证上传信息安全:

    <img src="img/0.jpg"/>
    <form enctype="multipart/form-data" action="" method="post">
    选 择 上传文件: <input type="file" name="img" /><br/><br/>
    输入唯一验证码:<input type="password" name="yzm"/><br/><br/>
    &nbsp;&nbsp;&nbsp;<input type="submit" value="开始上传"/>
    </form>
    <?php
    if(isset($_POST["yzm"])){
    $yzm=trim($_POST["yzm"]);
    if($yzm=="验证码"){
    class Test{
    public static function main(){
    if(!empty($_FILES)){
    $test=new Test();
    $test->uploadImg();
    exit;
    }
    }
    public function uploadImg(){
    $fi=$_FILES['img'];
    $finame=$fi['name'];
    $res=move_uploaded_file($fi['tmp_name'],'file/'.trim(iconv("utf-8","gbk",$finame)));
    if($res){
    echo "------文件{ ".trim($finame)." }上传成功---------------";
    }else{
    echo "!!文件{ ".trim($finame)." }上传失败【2】!!";
    }
    }
    }
    Test::main();
    }else{
    echo "!!文件上传失败【1】!!";
    }
    }
    ?>

    页面还没做啥美化,哈哈

    更多详情可参考:

    https://www.cnblogs.com/dongxiaodong/p/10066333.html

  • 相关阅读:
    vbScript首字拼音查询
    C#读取U盘序列号
    下拉 回车 筛选
    Oracle的汉字转拼音首字母的函数
    sql 触发器禁止和启用
    List.FindAll 方法
    MyControl 常用操作
    List.Find 方法
    regsvr32 C:\WINDOWS\system32\cell32.ocx
    2222222
  • 原文地址:https://www.cnblogs.com/dongxiaodong/p/9739029.html
Copyright © 2020-2023  润新知