我查阅了一些文章和教程。
我不知道如何处理我的图片上传文件夹的安全性。
这是分类广告的图片,应该上传到文件夹中。
这就是我想要的:
Anybody may upload images to the folder.
The images will be moved to another folder, by another php-code later on (automatic).
Only I may manually remove them, as well as another php file on the server which automatically empties t
我有房间,画廊和图片。我想把画廊和房间联系起来,然后使用房间模型访问指定画廊的图片。我刚进入Laravel,我查看了YouTube课程和文档,但没有找到解决我的问题的方法。
Room.php:
class Room extends Model
{
protected $table = 'rooms';
public function gallery()
{
return $this->hasOne('App\Gallery');
}
}
Gallery.php:
class Gallery extends
我是新手在使用Php的图像。我找到了显示图像的代码
<<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
// Save the image as 'simpletext.jpg'
imagejpeg(
我正在使用来显示图像。我已经添加了一个按钮来删除当前被点击和放大的图像。但是,这不会删除被点击的图像,但会删除相册中的第一张照片。
如何获取被点击的图片的图片路径,即当前图片
这是我添加到图库脚本中的jQuery代码:
var image = $('#photos').attr("alt");
/* If delete is called */
$('#adelete').click(function(){
//create post data
当一张图片被上传到网站时,我想在图片下面显示它被上传的月份。我在数据库中有一个时间戳字段。
我能从时间戳中得到月份吗?如果可能,我该怎么做?
我试着用下面的代码来实现
<?php $query="SELECT * FROM magimgdes ORDER BY id DESC, time DESC " ;
$result=mysql_query($query) OR DIE(mysql_error());
while($row=mysql_fetch_array($result)){
$value1=$row['image'];