In the previous article, we inserted the data in the text into the textarea, which needs to be processed in the background. In the textarea, the carriage return character is not /n, but should be chr(13). So the corresponding asp processing code is as follows
Copy the code code as follows:
dedearr=split(xiangguanid2,chr(13)) 'Split into arrays
for dede=0 to ubound(dedearr)-1 'The array length is reduced by one because there are two chr(13) line breaks at the end.
dedearr2=split(dedearr(dede),|)
dedetitle=dedearr2(1)
dedeurl=dedearr2(0)
if dedetitle<> and dedeurl<> then
xiangguanart2=xiangguanart2&<li><a href=&dedeurl& />end if
next
end if
Please refer to the processing code of php (dedecms)
Copy the code code as follows:
$cfg_softinfos['sites'] = ereg_replace(/n{1,},/n,str_replace(/r,/n,$cfg_softinfos['sites']));
$sites = explode(/n,trim($cfg_softinfos['sites']));
foreach($sites as $site)
{
if(trim($site)=='') continue;
list($link,$serverName) = explode('|',$site);
if(!eregi(^(http|ftp)://,$firstLink)) $flink = trim($link).$firstLink;
else $flink = $firstLink;
if($cfg_softinfos['gotojump']==1) $flink = $phppath./download.php?open=1&aid=$aid&cid=$cid&link=.urlencode(base64_encode($flink));
$temp = str_replace(~link~,$flink,$tempStr);
$temp = str_replace(~server~,$serverName,$temp);
$downlinks .= $temp;
}
}