1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

allow_url_fopen

Discussion in 'PHP' started by schandak2001, Jun 18, 2019.

  1. #1
    I have Created a PHP File with Below Codes :

    <?php
    ini_set("allow_url_fopen", 1);
    if( ini_get('allow_url_fopen') ) {
    die('allow_url_fopen is enabled. file_get_contents should work well');
    } else {
    die('allow_url_fopen is disabled. file_get_contents would not work');
    }

    ?>


    I am still getting Below error :

    allow_url_fopen is disabled. file_get_contents would not work
    ----------------------------------------------------------------------
    Let me know what Parameters should check ?
     
    schandak2001, Jun 18, 2019 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #2
    It looks like it's disabled in your php.ini file. You need to change off to on. allow_url_fopen = on
     
    qwikad.com, Jun 19, 2019 IP
    JEET likes this.
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    Most likely the host has disabled the ability to set flags directly in a php file. As already suggested, you'll need to edit php.ini or possibly a .htaccess directive to get it working.
     
    jestep, Jun 25, 2019 IP