Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8840729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:31:54+00:00 2026-06-14T10:31:54+00:00

I have MVC architecture for my project and recently I got a weird problem.

  • 0

I have MVC architecture for my project and recently I got a weird problem. Whenever I try to respond the Ajax request with printing some output in PHP, I get 8 enter characters before my output. I noticed that it’s putting these characters when just I want to echo but I don’t know how these extra enters come when they’re not in the string that I try to output. I’ve checked all of my files encoding to make sure that they aren’t the problem. I even left the response empty to check whether there is some script earlier printing something or not but it wasn’t, the output was empty without any character.

Is there any tip?

Here’s my js:

$.ajax({
    url: _baseRoot + '/admin/request',
    type: 'post',
    data: "req=" + req + args,
    success: function(data)
    {
      var result = data.split(",");

      var m_type = "";

      switch(result[0])
      {
        case "error": m_type = "red"; break;
        case "warning": m_type = "yellow"; break;
        case "success": m_type = "blue"; break;
      }

      showMessage(m_type, result[1]);
    }
  });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:31:55+00:00Added an answer on June 14, 2026 at 10:31 am

    Can’t really pinpoint it without seeing the backend, but as as most php project goes, those are probably comes from various included files that doesn’t mean to output anything but has a ?> and a newline at their end. The php interpreter just simply passes everything to the output that is not inside the <?php ?> tags.

    If you don’t want to output anything from a php file, you can remove closing ?> and the interpreter simply detects the end-of-file as the end-of-script, and it makes sure that no accidental whitespace creeps into the output from after ?>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using MVC 3 architecture in my project. I have a master page
I have an MVC architecture, but when I try to make another TabPanel insite
I am new to ASP.net MVC architecture. I have read in some articles that
I have a mvc web project where I try to render a list of
I have been using an Object-Oriented MVC architecture for a web project, and all
I currently have an ASP.NET MVC project built on top of the S#arp architecture
I am using a Cairngorm MVC architecture for my current project. I have several
I have a PHP application that is built around the MVC architecture without any
I have been trying to find the different between MVC and 3-tier architecture in
I have an MVC project in .Net 4 with WCF service with BasicHttpBinding. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.