我是ColdFusion的新品牌(截至今天)。我不知道服務器使用的是什麼版本。我已閱讀http://help.adobe.com/livedocs/coldfusion/8/htmldocs/help.html?content=Part_4_CF_DevGuide_1.html中的一些內容以嘗試加快速度。我如何分解一個來自ColdFusion中html表單的數組?
我現在最大的問題是:這一點PHP的ColdFusion等價物是什麼?
$numatt = $HTTP_POST_VARS['numatt'];
$att=explode(",",$numatt);
$attcount = count($att);
這裏有一個背景下,整個PHP腳本:
<?php
$nument = $HTTP_POST_VARS['nument']; # this is one number. My debug example is 2.
$numatt = $HTTP_POST_VARS['numatt']; # this is an indefinite number of numbers separated by commas. My debug example is 3,5.
$numval = $HTTP_POST_VARS['numval']; # this is one number. My debug example is 6.
echo 'number of entities is: $nument<br><br>';
$att=explode(",",$numatt);
$attcount = count($att);
echo 'the attributes are $numatt, which can be broken down to $att[1] and $att[2].<br><br>';
echo 'there are $numval values for each attribute.<br><br>';
for ($i = 1; $i = $nument; $i++) {
echo 'this is round $i of the loop. It has $att[$i] attributes.<br><br>';
for ($j = 1; $j = $att[$i]; $j++) {
echo 'this is for attribute $j of entity $i.<br><br>';
for ($k = 1; $k = $numval; $k++) {
echo 'here is loop $k for $numval values.<br>';
} #end $k
} #end $j
} #end $i
?>
基本上我需要翻譯,從PHP於ColdFusion,但認爲我可以弄清楚如何建立循環,如果我花足夠的時間在手冊中。 (或者我會回來更多的問題...)指向更好的手冊或入門參考也將受到歡迎 - 我剛剛通過谷歌找到了上面鏈接的那個。
你會喜歡這個頁面:http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec1a60c-7ffc.html – 2014-10-09 20:53:49
*剛剛發現了一個通過谷歌* Adobe的文檔上面鏈接是開始的好地方。大部分函數名稱都是不言自明的。如果您不知道函數名稱,但是有一個想法應該做什麼,[類別功能](https://wikidocs.adobe.com/wiki/display/coldfusionen/Functions+by+category)也很有用。 – Leigh 2014-10-09 20:58:21
注意,您可以通過登錄到CF管理器來獲取版本號 - 或者 - 通過轉儲服務器變量:'' –
Leigh
2014-10-09 21:05:46