将图像上传到我的服务器目录并使用该URL

时间:2022-09-03 21:21:40

I am stuck and really don't have any idea how can i do this. I want to upload an image to my server root directory. And then i want to use the url of that image. Like

我卡住了,真的不知道我怎么能这样做。我想将图像上传到我的服务器根目录。然后我想使用该图像的网址。喜欢

   <img src="http://example.com/image/name.jpg">.

I want to use this url in a html page. Which will have no link with my website. anyone clicks that html file will see the picture along with few details.

我想在html页面中使用此URL。哪个与我的网站没有任何关联。任何人点击该html文件将看到图片以及一些细节。

1 个解决方案

#1


0  

You have to create a folder into your server like "images/" and you upload there you image "image.jpg", you only have to put this link: "http://yourwebpage.com/images/image.jpg" into a like: <img src="http://yourwebpage.com/images/image.jpg">. I hope this is what you want to know, if not, tell me in the comments.

您必须在服务器中创建一个文件夹,如“images /”,然后在那里上传图像“image.jpg”,您只需将此链接:“http://yourwebpage.com/images/image.jpg”放入像:将图像上传到我的服务器目录并使用该URL。我希望这是你想知道的,如果没有,请在评论中告诉我。

#1


0  

You have to create a folder into your server like "images/" and you upload there you image "image.jpg", you only have to put this link: "http://yourwebpage.com/images/image.jpg" into a like: <img src="http://yourwebpage.com/images/image.jpg">. I hope this is what you want to know, if not, tell me in the comments.

您必须在服务器中创建一个文件夹,如“images /”,然后在那里上传图像“image.jpg”,您只需将此链接:“http://yourwebpage.com/images/image.jpg”放入像:将图像上传到我的服务器目录并使用该URL。我希望这是你想知道的,如果没有,请在评论中告诉我。