DedeCMS return values

Source: Internet
Author: User
The dedeCMS return value problem occurs in DEDE, extend. func. php file, write user-defined function & nbsp; cn_substr0 ($ str) {& nbsp; return & nbsp; "0 ";} I want to return a value of '0'. how does DEDE return a null value? how can I solve the problem that dede returns a value of 0 decms?
In the DEDE, extend. func. php file, write a UDF.

Function cn_substr0 ($ str)
{
Return "0 ";
}


I want to return a value of '0'. how can I solve the problem that DEDE returns a value equal to 0 and returns a null value? Thank you.
------ Solution --------------------
It cannot be blank ~ // Is_null ($ res) === true
Change your test to another one, for example
Return null;
Return 123;
Return "ABC ";
After a few tests, you can see whether the call method is incorrect or the judgment condition is incorrect.
------ Solution --------------------
I agree with the first floor. it is recommended to output another value for a try. 0 has never been returned. if the returned value is null, add an if (! Empty ($ str) {} judge

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.