-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hi,
i am going to run lessjs in v8. this is my php code:
if( !function_exists('xh_pre')){
function xh_pre($sHeader, $Message = ""){?>
<pre>
<style type="text/css">pre.xh_debug{border: 1px solid #ccc;padding: 3px;margin: 3px;}pre.xh_debug>h4{border-bottom: 1px solid #bbb;margin-top: 5px;margin-bottom: 5px;background-color: #ccc;color: #000;}pre.xh_debug>h4>span{ cursor: pointer;}</style><script>function xh_pre(oEle){ if( oEle.parentNode.parentNode.children[1] == undefined || oEle.parentNode.parentNode.children[1].tagName.toLowerCase() != 'div' ){return ;} var display = oEle.parentNode.parentNode.children[1].style.display =='none'? 'block':'none'; oEle.parentNode.parentNode.children[1].style.display = display; oEle.innerHTML = display=='none' ? '[ + ]':'[ - ]'; }</script>
<pre class="xh_debug">
<h4> <span onclick='xh_pre(this)'>[ - ]</span> <?php echo $sHeader; ?> </h4>
<div><?php echo htmlspecialchars($Message); ?></div>
</pre>
</pre>
<?php
}
}
$context = new JS\Context;
$js = file_get_contents('js/less-v8.js');
xh_pre('$js', $js);
$b = $context->evaluate($js);
xh_pre('$b', $b);
$js = file_get_contents('js/process.js');
xh_pre('$js', $js);
$b = $context->evaluate($js);
xh_pre('$b', $b);
var_dump($b);
js/less-v8.js
https://gist.github.com/hugdx/ce73ddd7a64fa0a332c03a2a4ee6a7d9
js/process.js
https://gist.github.com/hugdx/9c54707435e576188d2d09ff4d13eb65
when i run above script,, response was cropped.
full html response after run: https://gist.github.com/hugdx/1f2625b7379032c4c2dbebb81b98abcb
it should be like this
(i added more phpinfo()
to end of php file to get above image)
i am running: php7-fpm
, nginx
Thanks
Metadata
Metadata
Assignees
Labels
No labels