我使用ckeditor的media embed插件.它工作正常,代码正确保存在数据库和youtube,soundcloud等.玩家在页面上显示确定.但是当用户进入他的管理,他可以编辑信息时,内部和标签中的文本没有显示,因此当用户点击保存按钮时,所有先前保存的iframe将被"删除"而只有其他将保存格式化文本.有没有办法在ckeditor中显示iframe代码?
我正在使用wkhtmltopdf将html页面导出为pdf,但它似乎与捷克字符有问题...我将整个html加载到变量中,然后我改变编码并像这样运行wkhtmltopdf:
$html = ob_get_clean();
$html = iconv("UTF-8","Windows-1250", $html);
file_put_contents('../export.php', $html);
$commandString = WKHTML_LIB.'http://www.estiroad.com/export.php sestava.pdf';
exec($commandString);
Run Code Online (Sandbox Code Playgroud)
.html文件具有正确的编码,但即使我设置--encoding windows-1250参数到命令字符串,它只是不工作...感谢任何想法...
编辑:我解决了这个问题!捕获是在常量WKHTML_LIB中,我在页面的开头定义:
define('WKHTML_LIB', "../wkhtmltopdf/wkhtmltopdf-amd64");
Run Code Online (Sandbox Code Playgroud)
我刚刚把路径写到了exec(); 命令,现在它甚至可以使用标志.很抱歉打扰你这么琐碎......现在$ commandString行看起来像这样:
$commandString = '"../wkhtmltopdf/wkhtmltopdf-amd64" --print-media-type --page-size A4 -R 50 --encoding windows-1250 --header-html header.html --margin-top 10mm --margin-bottom 10mm --margin-left 10mm --margin-right 10mm http://www.estiroad.com/export.php sestava.pdf';
Run Code Online (Sandbox Code Playgroud) 我的图表上的标签显示在工具提示上,看起来不太好.我试着玩zIndex,但没有结果.如何使工具提示不透明?这是我的jsFiddle:http://www.jsfiddle.net/4scfH/3/
$(function() {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'graf1',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
margin: 40,
text: 'Podíl všech pot?eb'
},
tooltip: {
//pointFormat: '<b>{point.y} K? [{point.percentage}%]</b>',
percentageDecimals: 2,
backgroundColor: "rgba(255,255,255,1)",
formatter: function() {
return this.point.name + '<br />' + '<b>' + Highcharts.numberFormat(this.y).replace(",", " ") + ' K? [' + Highcharts.numberFormat(this.percentage, 2) + '%]</b>';
}
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: …Run Code Online (Sandbox Code Playgroud)wkhtml不会像每个页面那样重复表格元素"th".所以我认为可以简单地使用--header-html选项并以这种方式手动添加表头.但是我不希望它们出现在第一页,因为已经有表头,加上其他一些第一页的东西......我找到了一些JS解决方案,但它对我来说太复杂了,因为我只知道它的基础知识JS ......有什么想法吗?
这些问题的标题说明了一切.我只发现了如何改变连接器的颜色.如果我删除该color:选项,它们都是灰色的.我试图用十六进制存储的颜色放入字段,没有结果,保持黑色.
我从PHP调用wkhtmltopdf像这样:
`$commandString = '
"../wkhtmltopdf/wkhtmltopdf-amd64"
--header-html '. $_SESSION['ER_HlavniLink'] .'/export_pdf/header31.php?IDstavba='.$IDstavba.'
--header-spacing 0
--footer-line
--footer-spacing 5
--footer-left "Vygenerováno pomocí webové aplikace www.estiroad.cz"
--footer-center "[page] / [toPage]"
--orientation Landscape
--user-style-sheet "../css/export.css"
--print-media-type
--page-size A4
--encoding utf-8
--margin-top 50mm
--margin-bottom 15mm
--margin-left 10mm
--margin-right 10mm
'.$_SESSION['ER_HlavniLink'].'/'.$export.' '.$nazev_sestavy;`
Run Code Online (Sandbox Code Playgroud)
如果要在头文件调用中添加参数,浏览器将向我显示错误:PDF文档加载失败...我能以某种方式解决此问题吗?
有一段时间我现在正在玩我的饼图着色...而且我得到了我的自定义颜色没有渐变,或默认颜色与渐变...我的颜色存储在PHP字段,我想加载像colors: <?echo $myColors;?>.我的代码的实际状态是这样的(它显示带渐变的默认颜色):
colors: Highcharts.map(Highcharts.getOptions().colors, function(color) {
return {
radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
stops: [
[0, color],
[1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
]
};
})
Run Code Online (Sandbox Code Playgroud)
我应该如何编辑它以便以简单的方式显示我自己的颜色?另外,我没有找到什么是"停止"选项...
可能重复:
如何在PHP中制作计算器?
我得到了像5*100/4这样的字符串,我需要从中做出一个数学语句...简单地说,当这是输入时,输出应该是125.有没有人知道任何简单的方法来实现这一点?我试过
$input = "5*100/4";
eval('$output = '.$input.';');
但是由于某种原因不起作用......有什么建议吗?
在我的页面上,用户可以在其音乐中插入嵌入链接.但是如果对象的宽度超过600px,则它不适合页面.所以我正在寻找一些方法来找到iframe标签的width参数,如果值大于600px,则将其更改为600px.但我的谷歌技能让我失望,所以我希望这里有人可以提供帮助.插入的iframe看起来像这样:
<iframe width="660" height="180" src="//www.mixcloud.com/widget/iframe/?feed=http%3A%2F%2Fwww.mixcloud.com%2FCLCK_Podcast%2Fclck-podcast-20-czscream%2F&embed_type=widget_standard&embed_uuid=fd5ce7dc-9687-45e1-8368-27631b48385f&hide_tracklist=1&replace=0&hide_cover=1" frameborder="0"></iframe>
Run Code Online (Sandbox Code Playgroud) highcharts ×3
php ×3
wkhtmltopdf ×3
colors ×2
iframe ×2
javascript ×2
string ×2
ckeditor ×1
embed ×1
encoding ×1
find ×1
header ×1
jquery ×1
label ×1
labels ×1
math ×1
media ×1
parameters ×1
tooltip ×1