Skip to content

file_get_content cause problems #329

Closed

Description

@FlashPanther

"file_get_contents() is the easiest and most widely used function to get the contents of a file. Just this simple function call could get the contents of a file for you. But if you wish to work on remote files, then you need to enable ‘allow_url_fopen’ in your ‘php.ini’ settings. But enabling ‘allow_url_fopen’ is a risk, as it has various security loop holes. So, it’s always good to disable it and look for an alternative to get the contents of a file.

Some hosts disable the function file_get_contents() for remote files. In that case you are forced to look for an alternative. In some cases file_get_contents() returns NULL or an empty string for perfectly right URLs."

We have some troubles with file_get_contents(), prefer Curl !

Activity

  1. karlitschek commented on Nov 8, 2012

    @karlitschek
    Contributor

    I don´t really understand what you want to tell us here.

  2. JFOC commented on Nov 8, 2012

    @JFOC

    @karlitschek he might be want recommend for curl instead file_get_contents ?

  3. FlashPanther commented on Nov 8, 2012

    @FlashPanther
    Author

    Right.

    I thing it's better. We have to change it for our use.

  4. DeepDiver1975 commented on Nov 9, 2012

    @DeepDiver1975
    Contributor

    @tompsy
    Can you please send us a pull request for one case where you had to change this?
    The team can then discuss the details. THX

  5. locked as resolved and limited conversation to collaborators on Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions