Remove blank line on every web page
I have 3 blank lines at the beginning of every page that is causing errors of an add-on with stamps.com. (PS I have worked closely with their support team). I can see the lines using firebug, but don't know which file is causing them. I am trying to REMOVE these lines but can't seem to locate them in the header and main_page php files, for templates, common and default folders.
I am using version 1.3.8a of Zen Cart.
The web site is pranajewelry.com
Any suggestions on which files in order of precedence and what special code I should look for?
- Ensure all output buffering is of.
- Call
headers_sent($file,$line);
at a point in time you know you already sent output (doesn't matter where, it can be at the end of the request). - Voilà, $file & $line hold the position where output started.
If the return of headers_sent
is true, but $line==0
, you'll have to look into auto_prepend
s.
I am surprised that those 3 blank lines cause problems with anything.
Anyway, they could be just about anywhere. Look for any lines in your files that aren't within PHP tags. You could have a common include for example that has 3 blank lines at the end of it. It could be anything. Typically, it will be before or after your <?php ?>
blocks.
I'd say those lines would have to be in one of your first includes in your template. Quite possibly you may have whitespace outside of you <?php ?>
blocks for your configuration or function include files.
hey if you want to remove blank line then replace that web page/s with "notepad++ software". it has advance text processing capability. or remove it with "macromedia dreamweaver 8.0" it has tag replacing options with you can replace blank lines present in all pages in website folder.
Locate this in your files in the directory (use search in files) and you will probably find the blank lines
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
Make sure to look after your closing ?>
as well. Anything after it will be sent to output; this is actually a good reason why you shouldn't use the closing ?>
at the end of your PHP files.
if you are using Dreamweaver try this out
- Open the file
- Click CTRL + F
- Select "Current document" in "Find in" (You can also select the folder if you have multiple files)
- Search in "Source code"
- Tick "Use regular expression"
- Type "[\r\n]{2,}"(without quotes) in "Find"
- Type "\n" (without quotes) in "Replace"
- Press "Replace All
精彩评论