警告:在PHP中,第162行被零除
我的网站上有以下错误: 错误(3):警告:在中被零除 public_html/app/code/community/VES/pdfproproprocessor/Pdf/include/table_frame_reflower.cls.php 在线162 在这一行,我有以下代码:警告:在PHP中,第162行被零除,php,Php,我的网站上有以下错误: 错误(3):警告:在中被零除 public_html/app/code/community/VES/pdfproproprocessor/Pdf/include/table_frame_reflower.cls.php 在线162 在这一行,我有以下代码: $increment = 0; // Case 1: if ( $absolute_used == 0 && $percent_used == 0 ) { $increment =
$increment = 0;
// Case 1:
if ( $absolute_used == 0 && $percent_used == 0 ) {
$increment = $width - $min_width;
foreach (array_keys($columns) as $i) {
$cellmap->set_column_width($i, $columns[$i]["min-width"] + $increment * ($columns[$i]["max-width"] / $max_width));
}
return;
}
如何解决此错误?试试这个
$increment = 0;
$max_width or $max_width=1;
// Case 1:
if ( $absolute_used == 0 && $percent_used == 0 ) {
$increment = $width - $min_width;
foreach (array_keys($columns) as $i) {
$cellmap->set_column_width($i, $columns[$i]["min-width"] + $increment * ($columns[$i]["max-width"] / $max_width));
}
return;
}
试试这个
$increment = 0;
$max_width or $max_width=1;
// Case 1:
if ( $absolute_used == 0 && $percent_used == 0 ) {
$increment = $width - $min_width;
foreach (array_keys($columns) as $i) {
$cellmap->set_column_width($i, $columns[$i]["min-width"] + $increment * ($columns[$i]["max-width"] / $max_width));
}
return;
}
您的
$max_width
变量未赋值,或保持零值。
如果情况并非如此,请尝试
echo
在If
语句中输入此变量的值。您的$max\u width
变量要么未赋值,要么保持为零。
如果情况并非如此,请尝试
echo
在If
语句中输入此变量的值。$max\u width的值是多少?打印并修复它我想你在第162行除以0,$max_width的值是多少?打印并修复它我认为你在第162行除以0,我添加了你的代码,现在我看到如下内容:2017-09-30T07:25:03+00:00 ERR(3):警告:include(OAuthException.php):打开流失败:第94行的/home/public_html/lib/Varien/Autoload.php中没有这样的文件或目录我添加了您的代码,现在我看到如下内容:2017-09-30T07:25:03+00:00错误(3):警告:include(OAuthException.php):打开流失败:第94行的/home/public_html/lib/Varien/Autoload.php中没有这样的文件或目录