如何删除php页面中不需要的行空间

时间:2015-05-16 04:36:30

标签: php html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Wallet Gravity</title>

<!-- CSS Global Compulsory -->
<link rel="stylesheet" href="css/loaderstyle.css">
<link rel="stylesheet" href="assets/css/style.css">
<link href="css/animate.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900' rel='stylesheet' type='text/css'>
<link href="css/blog_magazine.css" rel="stylesheet">

<style>
body {
    font-family: 'Lato', sans-serif !important; 
}

.multidrop {
    background-color: white;
    width: auto;
    border-radius: 5px; 
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    border: 1px solid #ccc;
}

.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
    border: 1px solid #d3d3d3;
    background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
    font-weight: normal;
    color: #555555;
    border-radius: 10px;
}

.pdngleftfive{
    padding-left:5px;
    color:#999;
}

#contain {
    position:absolute;
    top:150px;
}

#alert {
    font-size: 16px;
    color:black;
    background:#D8D8D8;
    width:350px;
    height:150px;
    padding:15px;
    right:200px;
    margin:100px;
    border-radius:10px;
    position:absolute;
}

#close1 {
    margin-top:20px;
}

#close {padding:3px;
    background:#6E6E6E;
    color:white;
    border-radius:5px;
    text-align:right;
    float:right;
    padding-left:25px;
    padding-right:25px;
}

/*.wrap-search{ background: none repeat scroll 0 0 #FFFFFF;
height: 200px;
overflow-x: hidden;
overflow-y:scroll;
position: absolute;
z-index: 9999;
width:97%;}*/

.mycheckbox label{
    top:3px; left:3px;
    margin-right:30px;     
}

2 个答案:

答案 0 :(得分:1)

在Notepad ++中打开文件

选择:编辑&gt;线路操作&gt;删除空行(包含空白字符)

答案 1 :(得分:0)

使用常规的texteditor,它可以处理查找和替换的正则表达式(例如TextWrangler)。 然后搜索^\r并将其替换为空。结果:

    <?php 
session_start(); 
include('header2.php'); 
$user=$_SESSION['user'];
// echo $_SESSION['user'];
$limit=4;
$page = (int) (!isset($_GET['p'])) ? 1 : $_GET['p'];
//echo $_GET['p']."value";
//echo $page;
$start = ($page * $limit) - $limit; 
if($_POST['email']!=""){
if(isset($_POST['submit']))
{
    $email=$_POST['email'];
    $se=mysql_query("select * from newsletter where email_id='$email'");
    if(mysql_num_rows($se)==0)
    {
        $rel=mysql_query("INSERT into newsletter (email_id) values('$email')");
        if($rel)
        {
            echo '<script>alert("You are finished with subscription. Thank you")           </script>';
    }
    }
    else {
        echo '<script>alert("You have already subscribed. Thank you")</script>';
    }
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Wallet Gravity</title>
<!-- CSS Global Compulsory -->
<link rel="stylesheet" href="css/loaderstyle.css">
<link rel="stylesheet" href="assets/css/style.css">
<link href="css/animate.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900' rel='stylesheet' type='text/css'>
<link href="css/blog_magazine.css" rel="stylesheet">
<style>
body {
    font-family: 'Lato', sans-serif !important; 
}
.multidrop {
    background-color: white;
    width: auto;
    border-radius: 5px;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    border: 1px solid #ccc;
}
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
  border: 1px solid #d3d3d3;
  background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
  font-weight: normal;
  color: #555555;
  border-radius: 10px;
}
.pdngleftfive{
padding-left:5px;
color:#999;
}
#contain {
    position:absolute;
    top:150px;
}
#alert {
    font-size: 16px;
    color:black;
    background:#D8D8D8;
    width:350px;
    height:150px;
    padding:15px;
    right:200px;
    margin:100px;
    border-radius:10px;
    position:absolute;
}
#close1 {
    margin-top:20px;
}
#close {padding:3px;
    background:#6E6E6E;
    color:white;
    border-radius:5px;
    text-align:right;
    float:right;
    padding-left:25px;
    padding-right:25px;
}
/*.wrap-search{ background: none repeat scroll 0 0 #FFFFFF;
    height: 200px;
    overflow-x: hidden;
    overflow-y:scroll;
    position: absolute;
    z-index: 9999;
    width:97%;}*/
.mycheckbox label{
 top:3px; left:3px;
 margin-right:30px;