Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 脚本在LinuxMint中不工作,在Windows中工作_Php_Linux_Windows - Fatal编程技术网

Php 脚本在LinuxMint中不工作,在Windows中工作

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

我有一个行为怪异的剧本。它在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/';
$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>';
?>


我只是好奇,你为什么把回声放在括号里<代码>回音(“
  • ”$list.“
  • ”)在Linux下运行时是否会出现任何错误?它失败了吗?-1
    脚本不起作用
    异常行为
    都不是错误代码,请向我们提供不起作用的详细说明。尝试在脚本顶部使用错误报告(E_ALL)HM…-服务器上是否可能没有gd库?