Guest User

Untitled

a guest
Jan 20th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. <br />
  2. <b>Warning</b>: fopen(/home/mbilal/public_html/cgi-bin/sl_upload_dir/AT_4228.slattach) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in <b>/home/mbilal/public_html/wp-content/themes/student/page-download.php</b> on line <b>39</b><br />
  3. <br />
  4. <b>Warning</b>: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for /home/mbilal/public_html/cgi-bin/sl_upload_dir/AT_4228.slattach in <b>/home/mbilal/public_html/wp-content/themes/student/page-download.php</b> on line <b>40</b><br />
  5. <br />
  6. <b>Warning</b>: fread(): supplied argument is not a valid stream resource in <b>/home/mbilal/public_html/wp-content/themes/student/page-download.php</b> on line <b>40</b><br />
  7. <br />
  8. <b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/home/mbilal/public_html/wp-content/themes/student/page-download.php</b> on line <b>41</b><br />
  9.  
  10. $tmp_file=SL_UPLOAD_DIR . "AT_{$file_id}.slattach";
  11. header('Content-Type: application/x-download');
  12. header('Content-Disposition: attachment; filename="'.$sl_file['original_name'].'"');
  13. header('Cache-Control: private, max-age=0, must-revalidate');
  14. $handle = fopen($tmp_file, "r");
  15. $contents = fread($handle, filesize($tmp_file));
  16. fclose($handle);
  17. echo $contents;
  18.  
  19. $file_id=$_REQUEST['file_id'];
  20. $sl_file=sl_getuploaded_file(array('file_id'=>$file_id));
  21.  
  22. <src="<?PHP echo esc_url(home_url('get-avtar?username=' . $usermeta[$id]['nickname'])) ?>" />
  23.  
  24. $avtar_file=SL_AVTAR_DIR . "avtar_{$user_id}.slavtar";
  25.  
  26. if(file_exists($avtar_file))
  27. {
  28. $data=getimagesize($avtar_file);
  29. header('Content-Type: ' . $data['mime'] );
  30. header('Cache-control: public' );
  31. header('filename="' . $username . '_avtar.jpg"');
  32. echo file_get_contents($avtar_file ."_64_64");
  33. }
Add Comment
Please, Sign In to add comment