Platinum Partner

Flex And PHP File Upload

Here is the php


\n";

/* Set the root node for the xml */
$xml_output .= "\n";

/* If file was moved and inserted */
if ( $result ) 
{
	/* Build the XML if file was successful */			     
	/* Set the child node */
    $xml_output .= "\t\n";
    
    /* status */
    $xml_output .= "\t\t" . "Successful" . "\n";
    
    /* file_name variable */
    $xml_output .= "\t\t" . $file_name . "\n";
    
    /* file_size variable */
	$xml_output .= "\t\t" . $file_size . "\n";
	
	/* file_type variable */
	$xml_output .= "\t\t" . $file_type . "\n";
	
	/* file_url variable */
	$xml_output .= "\t\t" . $file_url . "\n";
    
    /* Close the child result now and print the child result node out */
    $xml_output .= "\t\n";

}
    
} else {

	/* Set the content type for the browser */
	header("Content-type: text/xml");
	
	/* Set the header xml version */
	$xml_output = "\n";
	
	/* Set the root node for the xml */
	$xml_output .= "\n";

	/* Build the XML if file was un-successful */			     
	/* Set the child node */
    $xml_output .= "\t\n";
    
    /* status */
    $xml_output .= "\t\t" . "Error" . "\n";
    
    /* file_name variable */
    $xml_output .= "\t\t" . $file_name . "\n";
    
    /* file_name variable */
    $xml_output .= "\t\t" . "There was a problem uploading your file." . "\n";

    
    /* Close the child result now and print the child result node out */
    $xml_output .= "\t\n";
				
}

/* Close the parent results node */
$xml_output .= "";

/* Output all of the xml */
echo $xml_output; 



?> 


Here is the Flex.





	
		
	
			

		
		
			
			
		
			
		
		
			
		
		
				
				
				
					
	
	
			
			
				
			
			
				
			
			
	

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}