Commit b09cc291 authored by hj's avatar hj

更新提交0

parent 94bf0233
...@@ -35,12 +35,12 @@ class ChemicalsMsdsService ...@@ -35,12 +35,12 @@ class ChemicalsMsdsService
preg_match('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i',$msds_html, $bodyStyle); preg_match('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i',$msds_html, $bodyStyle);
$msds_html = preg_replace('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i', '11123', $msds_html); $msds_html = preg_replace('/<body>[\s]*?<style>(?<bodyStyle>[\s\S]*?)<\/style>/i', '11123', $msds_html);
$bodyStyle['bodyStyle'] = "<style>body{ font-family: 'msyh'; font-size: 0.8rem; font-weight: bold; display: block;}.container { position: relative;z-index: 5;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;display: table;width: 100%;} " . $bodyStyle['bodyStyle'] = "<style>body{ font-family: 'msyh'; font-size: 0.8rem; font-weight: bold; display: block;}.container { position: relative;z-index: 5;padding-right: 5px;padding-left: 5px;margin-right: auto;margin-left: auto;display: table;width: 98%;} " .
$bodyStyle['bodyStyle']."</style><body>"; $bodyStyle['bodyStyle']."</style><body><div class='container'>";
$msds_html = preg_replace('/\.sds-cn[\s]*?\{[\s]*?line-height: 1.5;[\s]*?\}/i', '.sds-cn{line-height: 2.5;}', $msds_html); $msds_html = preg_replace('/\.sds-cn[\s]*?\{[\s]*?line-height: 1.5;[\s]*?\}/i', '.sds-cn{line-height: 2.5;}', $msds_html);
$msds_html = preg_replace('/11123/', $bodyStyle['bodyStyle'], $msds_html); //$msds_html = preg_replace('/11123/', $bodyStyle['bodyStyle'], $msds_html);
//$msds_html = preg_replace('/<\/body>/', '</div></body>', preg_replace('/11123/', $bodyStyle['bodyStyle'], $msds_html)); $msds_html = preg_replace('/<\/body>/', '</div></body>', preg_replace('/11123/', $bodyStyle['bodyStyle'], $msds_html));
//file_put_contents('./test.html', $msds_html); //file_put_contents('./test.html', $msds_html);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment