Team
i am developing a small solution which should read a htm source file from disk and then read the contents of the html source into drupal node body. but for some reason, i am getting "1" rather than the html code. if i do a var_dump on the variable its showing the html source, but when sent to drupal not working, any help on this is really appreciated.
function file_upload_form_submit($form, &$form_state) {
$validators = array(
'file_validate_extensions' => array('html htm'),
);
if($file = file_save_upload('excelfile', $validators,'', FILE_EXISTS_RENAME))
{
$dest = '/tmp/';
$source_file = $dest.$file->filename; //get the destination folder and the file name
$target_file = $dest."process".$file->filename; // create a dynamic html file name
echo $source_file ."
".$target_file;
// run the code cleaner perl module
$code_cleaner_cmd = "perl /var/www/drupal7/sites/all/modules/custom/file_upload/codecleaner-508.pl ".$source_file ." ".$target_file;
exec($code_cleaner_cmd);
//create the 508 file name
// $new_target_file = $dest."508".$file->filename;
// $code_508_cleaner = "perl /var/www/drupal7/sites/all/modules/custom/file_upload/codecleaner-508.pl ".$target_file ." ".$new_target_file;
// exec($code_508_cleaner);