php proxy woff font using fpassthru -


hi trying proxy woff font file using php

this code using $path path file on harddisk. error in console

failed decode downloaded font: http://localhost/font/fontawesome-webfont.woff?v=3.2.1 fakemboard.com/:1 ots parsing error: invalid version tag

if use phpstorm default http server works fine.

i have attached 2 images:

1) first problematic response php proxy

2) second 1 ok 1 using phpstorm default server

can me find out missing proxy? believe may headers buy weak @ that. helpful if provide missing code. thanks

header('content-type: application/font-woff'); $file =  fopen($path, 'rb'); if ($file) {     fpassthru($file);     exit; } 

error response proxy

ok response phpstorm server

i flowed mike 'pomax' kamermans advice , compered file font file bad font file. indeed different. bad file has 2 blank lines in beginning.

it happened because in 1 of php files have included accidentally added blank lines before <?php tag , php rendered them. hope helps else


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -