zoukankan      html  css  js  c++  java
  • 点对点PSCV

    <?php
    error_reporting(0);
    // $str='D:adminz1addonsewei_shopv2 emplatemobiledefaultmemberaddress';
    $aa1=file_get_contents('test1.txt');

    if(!empty($_POST['cont'])){
        $p=$_POST['cont'];
        $str1=str_replace(" ", ",", $p);
        if(strpos($str1,',')){
            $arr=explode(',', $str1);
            foreach($arr as $k=>&$v){
                $v='/'.str_replace('\', '/', $v);
            }
            $arr2=array();

            foreach ($arr as $key => $value) {
                $temp=explode('/', $value);
                array_pop($temp);
                $temp=implode('/', $temp);
                $arr2[]=$temp;
            }
        }else{
            $str1='/'.str_replace('\', '/', $str1);
            $temp=explode('/', $str1);
                array_pop($temp);
                $temp=implode('/', $temp);
            $arr2[]=$temp;
        }
        // var_dump($arr2);die;

        // $str1=str_replace("\", "/", $_POST['cont']);
        // $str1=str_replace("D:/admin/z1", "", $str1);
        // $aa='/addons/ewei_shopv2/plugin/app/core/mobile/member'." ";
        foreach ($arr2 as $key => $value) {
                file_put_contents('test1.txt', $value." ",FILE_APPEND);
            }
        // file_put_contents('test1.txt', $arr2." ",FILE_APPEND);
        $aa1=file_get_contents('test1.txt');
        // echo $str1;
    }

    ?>

     
    <html>
    <head> 

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>Hello, World</title> 
    <style type="text/css"> 
    html{height:100%} 
    body{height:100%;margin:0px;padding:0px} 
    #container{height:100%} 
    </style> 
    </head> 
      
    <body> 
        
    <div style="900px; height=1000px; margin:40px auto;">
        <?php if(is_array($arr2)){?>
        <div>
            <?php foreach ($arr2 as $key => $value) {?>
                <input type='text' value="<?php echo $value?>" style="500px"><br>
            <?php }?>
            
        </div>
        <?php }?> 
        <form action="" method="post">
            <input type="text" name="cont" style="400px"/><input type="submit"  value="提交">

        </form>
         <textarea cols=100 rows=100><?php echo $aa1; ?></textarea>
    </div>
    </body> 
    </html>

  • 相关阅读:
    高精度除法(到小数点后200位)
    CodeForces-Zuhair and Strings(思维+枚举)
    Codeforces-Salem and Sticks(枚举+思维)
    idata的各个类型
    C51串口的SCON寄存器及工作…
    XCode快捷键
    Objective-C 的 self 和 super 详解 (用简单程序说明问题)
    UITextFieldDelegate委托方法注释
    Objective-C 基础语法log打印那些事儿(一)
    fcntl详细说明
  • 原文地址:https://www.cnblogs.com/csjoz/p/15201757.html
Copyright © 2011-2022 走看看