Converting a php script to cf

2002-12-18 Thread Luis Lebron
I am trying to convert a php script that reads a text file with email addresses (1 per line) and puts them in a database into a CF script. Here's the original php code PHP $filename=master_email.txt; $fp=fopen($filename, r); $EmailList = fread ($fp, filesize ($filename)); $EmailList = explode

RE: Converting a php script to cf

2002-12-18 Thread Craig Dudley
To: CF-Talk Subject: Converting a php script to cf I am trying to convert a php script that reads a text file with email addresses (1 per line) and puts them in a database into a CF script. Here's the original php code PHP $filename=master_email.txt; $fp=fopen($filename, r); $EmailList = fread ($fp

RE: Converting a php script to cf

2002-12-18 Thread webguy
here u go others can explain any code... cfset newline = chr(13) chr(10) cfset filename=master_email.txt cffile action=read file=#filename# variable=Emails cfset emailarray = ListToArray(#Emails#,#newline#)) !--- stript out duplicates here --- cfoutput #Arraylen(emailarray)#br /cfoutput