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