1

When I upload my files to server, newlines somehow disappear, and my files change from this:

   <?php

$category = get_the_category();
$parent = get_cat_name($category[0]->category_parent);


// $categories = get_option_tree ('blogcategory', ''); 
// 
// print_r($categories);exit;
// 
// print_r($category);
// echo "+++++++";
// print_r($parent);

?>

<?php get_header(); ?>




<?php if ( get_option_tree ('breadcrumb', '') == "Active" ) { ?>

<div id="breadcrumb">

<div class="breadcrumbinner"><?php

if(class_exists('bcn_breadcrumb_trail'))

{

$breadcrumb_trail = new bcn_breadcrumb_trail;

$breadcrumb_trail->fill();

$breadcrumb_trail->display();

}

?>

</div>

<?php if ( get_option_tree ('twitterrss', '') == "Active" ) { ?>

<?php $rssurl = get_bloginfo('rss2_url'); ?>

<?php $rssurl2 = get_option_tree ('rssnavurl', $rssurl); ?>

.
.
.

to this:

<?php$category = get_the_category();$parent = get_cat_name($category[0]-

>category_parent);// $categories = get_option_tree ('blogcategory', ''); 
// 
// print_r($categories);exit;
// 
// print_r($category);
// echo "+++++++";
// print_r($parent);?><?php get_header(); ?><?php if ( get_option_tree ('breadcrumb', '') == "Active" ) { ?><div id="breadcrumb"><div class="breadcrumbinner"><?phpif(class_exists('bcn_breadcrumb_trail')){$breadcrumb_trail = new bcn_breadcrumb_trail;$breadcrumb_trail->fill();$breadcrumb_trail->display();}?></div><?php if ( get_option_tree ('twitterrss', '') == "Active" ) { ?><?php $rssurl = get_bloginfo('rss2_url'); ?><?php $rssurl2 = get_option_tree ('rssnavurl', $rssurl); ?><?php $twitterusername = get_option_tree ('twitternavurl', 'anteksiler'); ?><div class="twittercount"><a href="http://twitter.com/<?php echo $twitterusername; ?>"><?php twittercount($twitterusername) ?></a></div><div class="rsscount"><a href="<?php echo $rssurl2; ?>"><?php rsscount($rssurl2) ?></a></div><?php } ?><?php } else { ?><div class="clearfix"><?php } ?></div>      <div id="center-archive">           <?php $categories = get_option_tree ('blogcategory', ''); ?>                    <?php query_posts($query_string.'&cat='.$_GET['cat']); ?>           <?php if (have_posts()) :  while (have_posts()) : the_post(); ?>            <?php $image_id = get_post_thumbnail_id(); ?>             <?php $image_url = wp_get_attachment_image_src($image_id,'post-image'); $image_url = $image_url[0]; ?>            <?php $full_url = wp_get_attachment_image_src($image_id,'full'); $full_url = $full_url[0]; ?>            <div class="" id="post-<?php the_ID(); ?>">                <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>     :           <?php                   if (qtrans_getLanguage()=='fa')                     $date = jdate('Y/m/d',strtotime($post->post_date));                 else                        $date = get_the_date('Y/m/d');                                  echo $date ;                                            ?>            </div>            <?php endwhile; ?>              <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>            <?php else : ?>            <?php endif; ?>        </div>        <?php get_sidebar(); ?>        <div class="clearfix"></div>   </div></div><?php get_footer(); ?>

Is it server problem or filezilla problem?

note : This is a dummy text to solve short description problem :D

Cœur
  • 32,421
  • 21
  • 173
  • 232
Mostafa Solati
  • 1,127
  • 2
  • 11
  • 30
  • 2
    Might be a cross OS problem. Windows, linux and mac uses different line ending characters. So be aware of this. Try opening the file in vim and see this http://stackoverflow.com/questions/82726/how-do-i-convert-dos-files-to-linux-files-in-vim – Behlül Mar 11 '12 at 18:29
  • I use linux and upload file into linux server . It's impossible to open and edit 2000 files manualy – Mostafa Solati Mar 11 '12 at 18:33
  • 2
    Try uploading them in binary mode (there's probably some setting for that in filezilla). Now, FTP text-mode should only translate newlines, not delete them - so it's not clear if that is the problem, but who knows, maybe it works. – rwos Mar 11 '12 at 19:14
  • I've had this issue many times and it was always the line endings. – Wesley Murch Mar 11 '12 at 19:38
  • Does it also remove the spaces before ``? Maybe you should inspect the original file with a binary editor. – Mr Lister Mar 12 '12 at 12:59

0 Answers0