Menu

#60 Warning: file_get_contents(http://www.hm2k.com/wp-content/th

open
nobody
None
5
2008-06-11
2008-06-11
HM2K
No

Warning: file_get_contents(http://www.hm2k.com/wp-content/themes/hm2k/style.css" type="text/css" media="screen,print) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/share/www/tmp/html2fpdf/html2fpdf.php on line 2211

I found that the regex on line 2182 was incorrect...

FIND
$regexp = '/<link rel="stylesheet".*?href="(.+?)"\\s*?\/?>/si';

REPLACE WITH
$regexp = '/<link rel=[\'"]stylesheet[\'"].*?href=[\'"](.+?)[\'"]/si';

It doesn't need to be so strict... just an opening and closing " will do...

I gave it an option of using " or ', as sometimes people use '...

You shouldn't really use regex to parse HTML anyway, but never mind...

Discussion


Log in to post a comment.

MongoDB Logo MongoDB