Online, etc.-single quotation marks and double quotation marks for passing parameters in PHP functions

Source: Internet
Author: User
Online-PHP function transfer parameters single quotes and double quotation marks http://software.ftp.sscmoni.com/1.png
You can use the image if it cannot be uploaded.
The parameter passed in this function is base64 decryption in the red box. the passed parameter cannot be decrypted. if it is directly entered, it cannot be completed in single quotes. it is successful in double quotes, the parameter contains the \ n line break, and the double quotation marks take effect. so I want to pass this parameter because it is dynamic and submitted in the POST form. how should I write it?
 


Reply to discussion (solution)

No matter what the $ user is before base64_encode, after base64_encode, it will never contain line breaks.
Therefore, we cannot discuss it on the basis of nothing.

No matter what the $ user is before base64_encode, after base64_encode, it will never contain line breaks.
Therefore, we cannot discuss it on the basis of nothing.


There was a line break before base64_encode. now the problem is that the line break does not take effect during conversion. what should I do?

There is a line break before base64_encode
Then after $ encryptedData = base64_decode ($ user );
$ EncryptedData contains line breaks.
But you can't see the echo $ decrypted; because the browser won't display the line break as a line break. The line feed in html is the br and p mark.
You must be in the text state to observe

Thank you for helping me solve the problem.

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.