Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.sendAndLoad() using coldfusion

Status
Not open for further replies.

okiiyama

IS-IT--Management
Jan 3, 2003
269
US
I've taken a sendAndLoad() example that was written in php, and re-wrote it in coldfusion. The example works in php, but not in coldfusion.

Here is the php code:
Code:
<?php

$maindir = "MagazineJPGs";
$mydir = opendir($maindir);
while(false !== ($file = readdir($mydir))){
    if(!is_dir($file)){
        $fileList[] = $file;
    }
}
closedir($mydir);

rsort($fileList);

$flash = "theFiles=";
foreach($fileList as $file){
    $flash .= urlencode($file)."#";
}

echo $flash;
?>

Here is my ColdFusion Code:
Code:
<cfoutput>
<cfset maindir = "E:\SomePath\MagazineJPGs">
<cfdirectory directory=#maindir# name="myDir" sort="name desc">
<cfset flash="theFiles=">
<cfloop query="myDir">
	<cfset flash=flash&#name#&"##">
</cfloop>
#flash#
</cfoutput>

I think I know enough about php to translate this into coldfusion, and both output the identical string. Is there something additional I need to do with coldfusion either on the CF page, or in flash, ..etc?

I'm stumped.

Thanks.
 
Nevermind, I think I figured it out. In the output of the string, I need to output &#flash# instead of #flash# . If this is correct could someone tell me why?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top