function _fillpdf_get_file_contents in FillPDF 7
Same name and namespace in other branches
- 6 fillpdf.module \_fillpdf_get_file_contents()
- 7.2 fillpdf.module \_fillpdf_get_file_contents()
2 calls to _fillpdf_get_file_contents()
- fillpdf_execute_merge in ./
fillpdf.module - Utility to allow other functions to merge PDFs.
- fillpdf_execute_parse in ./
fillpdf.module - Utility to allow other functions to parse PDFs.
File
- ./
fillpdf.module, line 1880
Code
function _fillpdf_get_file_contents($filepath, $error_goto = NULL) {
$filepath = drupal_realpath($filepath);
if ($error_goto && !file_exists($filepath)) {
drupal_set_message(t('@filepath does not exist. Check your
filesystem settings, as well as http://drupal.org/node/764936', array(
'@filepath' => $filepath,
)), 'error');
drupal_goto($error_goto);
}
$handle = fopen($filepath, "r");
$content = fread($handle, filesize($filepath));
fclose($handle);
return $content;
}