• 点对点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>

  • 相关阅读:
    ssm框架实现多条件查询分页(模拟百度算法)
    spring与mybatis的整合
    spring入门
    mybatis foreach标签用法
    图书借阅系统简易异步分页源码
    Jquery常用选择器
    mvc
    Java连接数据库 jdbc
    java学习线路
    Mybatis传递多个参数的几种方式
  • 原文地址:https://www.cnblogs.com/csjoz/p/15201757.html
Copyright © 2020-2023  润新知