The MU forums have moved to WordPress.org

readfile() disabled - security risk (2 posts)

  1. leviputna
    Member
    Posted 18 years ago #

    Ok I have a little problem my hosting company has disabled readfile(), they say is a security risk.

    I'm a bit puzzled as to how readfile() is a security hazard but they refuse to enable it.

    The blog.php file uses readfile() in displaying files and images that have been uploaded via the add media button.

    With readfile() I cannot display any files

    Douse anyone know an alternative to using readfile()?
    Is there another way around this problem?

    Thanks,
    Levi

  2. donncha
    Key Master
    Posted 18 years ago #

    You could change it to fopen() the file and fgets() to read and then echo it out.

    Or move hosting company.

About this Topic

  • Started 18 years ago by leviputna
  • Latest reply from donncha