Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将以下 PHP 行转换为 Coldfusion
$age = 10 $test = pow($age,-2)*log($age);
Coldfusion 没有 POW() 函数。这就是我想出的
<cfset age = 10> <cfset test = age^-2*log(age)>
任何帮助将非常感激。
詹姆士
操作^员完成工作
^
你做对了
如果将此代码(以及任何紧接在其前面或后面的代码集)放在cfscript. 哦,别忘了定义变量的范围:
cfscript
<cfscript> variables.age = 10; variables.test = variables.age^-2*log(variables.age); </cfscript>