WordPress.org

Ready to get started?Download WordPress

Forums

Why ALL My php Files have Empty Lines Inbetween ? (7 posts)

  1. Hema Latha
    Member
    Posted 2 years ago #

    Hello,

    I just need a clarification.
    In each and every php file there is an empty line inbetween the lines.
    I dont know why. Can someone tell me why is this happening ?

    Example:

    <?php get_header(); ?>
    
            <div id="content">
    
            <?php if (have_posts()) : ?>
    
                    <?php while (have_posts()) : the_post(); ?>
    
                            <div class="post" id="post-<?php the_ID(); ?>">

    Previously when I uploaded it, It was like this:

    <?php get_header(); ?>
            <div id="content">
            <?php if (have_posts()) : ?>
                          <?php while (have_posts()) : the_post(); ?>
                            <div class="post" id="post-<?php the_ID(); ?>">
  2. esmi
    Forum Moderator
    Posted 2 years ago #

    And where is this happening? In Appearance -> Editor? Is your site running on a non-Windows server?

  3. Hema Latha
    Member
    Posted 2 years ago #

    Hello esmi,

    It's happening all over my php files inside my wp site.
    But when I login to my dashboard -> Appearance -> Editor - It's fine.

    If I download the file to my computer,
    all the files has a blank line inbetween the lines as above..

    It's puzzling me..

  4. Hema Latha
    Member
    Posted 2 years ago #

    Sorry, I forgot to answer your question. It's on Linux dedicated server.

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    Sounds like the files were edited and saved in PC format rather than in Unix format. The end result is every line break gets doubled. If the theme files are re-saved in a plain text editor in UNIX format, the problem will disappear.

  6. Hema Latha
    Member
    Posted 2 years ago #

    Hmm.. I'm trying to understand what you said. Thanks esmi.
    [Note for you: Please have a hair cut]

  7. myabishek
    Member
    Posted 1 year ago #

    May be some code injected and automatically removed by a scanner.

    It may use "\r\n" for replace with blank line.

Topic Closed

This topic has been closed to new replies.

About this Topic