我有一个Java gradle根项目,并且有子模块项目。我添加了
<?php
if (isset($_POST['submit'])) {
$sql1 = "SELECT * FROM banner WHERE banner_id='$banner_id'";
$result1 = mysqli_query($conn, $sql1);
mysqli_num_rows($result1) > 0;
$row1 = mysqli_fetch_assoc($result1);
$fileinfo = @getimagesize($_FILES["image"]["tmp_name"]);
$width = $fileinfo[0];
$height = $fileinfo[1];
if (!empty($_FILES['image']['name'])) {
$extension = pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION);
$image = "Banner" . '-' . rand(10000, 99999) . '.' . $extension;
}
if ($_FILES["image"]["size"] > 2000000) {
$response = array(
"type" => "error",
($_SESSION['msg1'] = "Image size exceeds 2MB"),
);
} elseif ($width < "900" || $height < "250") {
$response = array(
"type" => "error",
($_SESSION['msg2'] = "the image should be used greater than 900 X 250 "),
);
} else {
$location = "image/banner/" . $image;
unlink("image/$image");
if (in_array(strtolower($extension), ['png', 'jpeg', 'jpg'])) {
compressImage($_FILES['image']['tmp_name'], $location, 60);
} else {
$image = $row1['image'];
}
$sql = mysqli_query(
$conn,
"update banner set Image='$image' where banner_id='$banner_id' "
);
$_SESSION['msg'] = "Successfully Banner Image Updated Successfully !!";
}
}
?>
对子模块的 build.gradle 文件的依赖性。根项目的 build.gradle 文件不具有此依赖性,仅具有
testCompile group: 'junit', name: 'junit', version: '4.12'
我跑步时
compile project(':json-display')
根项目终端上的命令,它在子模块中没有显示junit传递依赖关系,它给出如下输出:
gradle dependencies --configuration testCompile