well, you have a lot going on in ONE line... if you want some debugging help try doing:
<?php
$form_data = $_SERVER['SCRIPT_FILENAME']; // Replace with your own $form_data after first try successfully works
header("Content-Type: text/plain"
; // Header makes data easier to read. Remove after debug
function divider(){ echo "\n\n"; for ($i=0; $i<80; $i++) echo "-"; echo "\n\n"; } // Function for creating dividers
if (is_array($form_data)) exit("Debug: Your data is an Array and won't be passed correctly"
;
// With the file commands divided like this you should be able to figure it out easier
$filehandler = fopen($form_data, "r"
;
$filesize = filesize($form_data);
$filecontents = fread($filehandler, $filesize);
echo "fopen was able to return:"."\n" . $filecontents;
echo divider();
// Also try an alternative method of grabbing file contents
// This will help you determine if file permissions.
$filecontents = file_get_contents($form_data);
echo "file_get_contents was able to return:\n" . $filecontents;
?>
What I suppose, is that you're sending an array into the $form_data;