Php 脚本在LinuxMint中不工作,在Windows中工作
我有一个行为怪异的剧本。它在Windows7中正常运行(EasyPHP12.0、PHP5.4.4、Apache2.4.2),但在LinuxMint13(Apache2.2.22Ubuntu)中不起作用 我知道linux是区分大小写的,所以我仔细检查了文件路径,并使用了Php 脚本在LinuxMint中不工作,在Windows中工作,php,linux,windows,Php,Linux,Windows,我有一个行为怪异的剧本。它在Windows7中正常运行(EasyPHP12.0、PHP5.4.4、Apache2.4.2),但在LinuxMint13(Apache2.2.22Ubuntu)中不起作用 我知道linux是区分大小写的,所以我仔细检查了文件路径,并使用了error\u reporting(E\u ALL),但没有错误 <?php $DumpHere='../Img/Gallery/DumpHere/'; $ThumbsFolder='../Img/Gallery/Thumbs
error\u reporting(E\u ALL)
,但没有错误
<?php
$DumpHere='../Img/Gallery/DumpHere/';
$ThumbsFolder='../Img/Gallery/Thumbs/';
$PreviewFolder='../Img/Gallery/Preview/';
$Files=array_diff(scandir($DumpHere), array('..', '.'));
echo '<div id="FileList" >';
echo "<ul>";
foreach ($Files as $key => $list) {
echo ("<li>".$list."</li>");
}
echo "</ul>";
echo "</div> <!-- closes FileList -->";
echo '<div id="WorkArea"><form action="insertGalleryTitles.php" method="post"><ul>';
foreach ($Files as $key => $Processed) {
$filename = $DumpHere.$Processed;
// Get new dimensions
list($width, $height) = getimagesize($filename);
$ratio = $width/$height;
$outputHeight = 500*$ratio;
// Resample thumbnail
$image_p = imagecreatetruecolor(70, 70);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, 70, 70, $width, $height);
// Output Thumbnail
imagejpeg($image_p, $ThumbsFolder.'thumb_'.$Processed, 100);
// Resample preview
$image_p = imagecreatetruecolor(500, $outputHeight);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, 500, $outputHeight, $width, $height);
// Output Preview
imagejpeg($image_p, $PreviewFolder.'preview_'.$Processed, 100);
echo '<li><img src="'.$ThumbsFolder.'thumb_'.$Processed.'">';
echo '<input type="text" name="title['.$Processed.']" value="vyplň popisek">';
}
echo "</li>";
echo '</ul><input type="submit" ></form></div>';
?>
我只是好奇,你为什么把回声放在括号里<代码>回音(“脚本不起作用
和异常行为
都不是错误代码,请向我们提供不起作用的详细说明。尝试在脚本顶部使用错误报告(E_ALL)HM…-服务器上是否可能没有gd库?