Hi, I've got a Cocoa app which posts data to a PHP script and I'd like to switch out the PHP script for CF, but I can't seem to get it working. At the end of this email is the simplified (but working PHP script) followed by my replacement CF script.
To debug I've also tried dumping and writing out the form, url & cgi scopes, but I'm not seeing any form data being posted, yet the PHP script seems to be accepting it without a problem. Can anyone see what's going on here? Does PHP handle posted form data differently than I'm understanding? Working PHP script: <?php $feedback_dir = '/path/to/write/to'; $feedback_files = array('type','version','comment','email','exception','system','console','crashes','preferences','shell'); foreach($feedback_files as $file) { $dest = $feedback_dir . '/' . $file; $fh = fopen($dest, "w"); if (!$fh) { // failed to create file echo "ERR 004 $file\n"; echo "failed to create file"; continue; } fwrite($fh, $_POST[$file]); fclose($fh); echo "OK 004 $file\n"; } ?> My CF script: <cfloop list= "type,version,comment,email,exception,system,console,crashes,preferences,shell" index="thisFile"> <cftry> <cffile action="upload" destination="/path/to/write/to/#thisFile#" fileField="#thisFile#"> <cfoutput>OK 004 #thisFile#</cfoutput> <cfcatch type="any"> <cfoutput> ERR O4 #thisFile# failed to create file </cfoutput> </cfcatch> </cftry> </cfloop> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---