Solution to rn research-php Tutorial

Source: Internet
Author: User
Rn is studying php, so it is in this zone. The reason why I wrote this post is not clear, but not clear. I just threw myself in the discussion, because it is not necessarily correct yet. The meaning of rn is carriage return and line feed. in some cases, the effect of rn is the same, and the meaning of carriage return and line feed is also considered the same in most cases. in this case, what are the differences? Then we will understand their source and essential meaning. Research on printer r \ n
Because I am learning php, I am now in this zone. The reason why I wrote this post is not clear, but not clear.
I just threw myself in the discussion, because it is not necessarily correct yet.
\ R \ n indicates carriage return and line feed. in some cases, \ r \ n has the same effect, in most cases, carriage return and line feed are considered the same. in this case, what are the differences?
Then we will understand their source and essential meaning.
Source: Printer
\ R meaning carriage return the full name of carriage return. CR return indicates a return. carriage indicates a vehicle. in a printer, it indicates a sliding bracket (on a typewriter or other machines, obviously, when you see the printer, you know that the "car" can only move left and right, but cannot move up or down. then, press enter to return to the initial position after the end of a line. However, it is difficult to describe it on the computer. this is the result of moving the cursor to the front of the row with the left direction key.
\ N stands for newline or line feed. feed is used to add a line to the printer because the carriage can only be moved left and right, the line feed can only be moved by the print paper, which is equivalent to the effect of the direction key seek.

Now everyone understands, in the current sense, the carriage return and line feed, as well as the Enter on the keyboard, are actually \ r \ n (the line feed for the next carriage return all indicates the effect of \ r \ n ).

However, there should be line breaks when using carriage return, so it is expected to unify the effect, but the expressions are different, so \ r is used for mac, unix \ n, windows \ r \ n
In fact, the three expressions in windows Notepad have the same effect as those in keyboard return keys. windows has automatically converted to \ r \ n, however, using \ n \ r (reverse order) \ r \ n (with spaces in the middle) is two times, but this is not absolute, for example, if a file in unix seems to have a normal line feed effect, it will not work if it is put in windows Notepad, but there will be a small black box. it is normal for me to open this file using Dreamweaver.

\ N also indicates the end of a row. In fact, it is no different from what we mentioned above. This may be the reason why Unix uses it to represent line breaks.
There is also the problem of soft press enter and hard press enter, which may be encountered in different platforms for programming software. The former is \ n and the latter is \ r \ n. However, I have no experience in saying that it is correct or not, but in Word, shift + enter soft press enter means press enter to line feed ^ l, and enter hard press enter means change paragraph ^ p, this problem is also encountered in web design.

------ Solution --------------------
Windows \ r \ n
Linux \ n
Mac \ r

This is an agreement of the operating system, or a legacy issue.
Once you know it, there is no need to discuss it.
------ Solution --------------------
Discussion
Windows \ r \ n
Linux \ n
Mac \ r

This is an agreement of the operating system, or a legacy issue.
Once you know it, there is no need to discuss it.

------ Solution --------------------
Good post. it is good to do some research.
In other words, an overflow vulnerability in Windows is caused by such control words.

The starting code is like this:

Int main (void)

{

For (;{
Printf ("hung up \ t \ B ");

Print ("hung up \ t \ B ";

}

Return 0;

}

The out-of-bounds memory overwrite is caused by the absence of tabs.
------ Solution --------------------
Discussion
Windows \ r \ n
Linux \ n
Mac \ r

This is an agreement of the operating system, or a legacy issue.
Once you know it, there is no need to discuss it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.