Új hozzászólás Aktív témák

  • Dexter68

    addikt

    válasz Dexter68 #3072 üzenetére

    Újabb eredmény, de még mindig bénázom a szintaxissal. Szóval most már majdnem jó az útvonal a hibaüziben, kizárólag a https: után hiányzik a //.
    Tehát két helyen van benne a site_url, az egyik itt:

    if( strpos($src, 'http://') === FALSE && strpos($src, 'https://') === FALSE ){
    $src = preg_replace( '|([\.\.\/]+)(.*)|i' , $PT.'://'.$host.'/$2', $src);
    }
    else{
    $makeitlocal = trim(get_option( 'site_url();' ) . '/') . '/';
    $src = str_replace($makeitlocal, '', $src);
    }

    A másik meg itt:
    function wpp_path( $file ){
    $f = fopen($file,'rb');
    if(!$f){
    $makeitlocal = trim(get_option( 'site_url();' ) . '/') . '/';
    $file = str_replace($makeitlocal, '', $file);
    $f = fopen($file,'rb');
    if( !$f && strpos($file, 'http') !== FALSE ){
    echo ('[WPP PDF Error] Please turn on "allow_url_fopen" on your server to allow insert images in PDF Document, more info here: http://stackoverflow.com/questions/3694240/add-allow-url-fopen-to-my-php-ini-using-htaccess');
    }
    }
    fclose($f);
    return $file;
    }

    (nem könnyű javítani másnak a php kódját úgy, hogy közben magam sem tudok php-ül :DDD )

Új hozzászólás Aktív témák