简体   繁体   English

使用Codeigniter中的URL上传图像

[英]Upload an image using a URL in Codeigniter

我通过教程在Codeigniter中使用上传库上传图像,但我想知道:是否可以使用Codeigniter中的URL上传图像?

Yes, it's possible. 是的,这是可能的。 See the answer on this question: Saving image from PHP URL . 请参阅此问题的答案: 从PHP URL保存图像
If you're going to go the cURL route, see the CodeIgniter wiki entry: http://codeigniter.com/wiki/Curl_library/ 如果您要去cURL路线,请参阅CodeIgniter wiki条目: http//codeigniter.com/wiki/Curl_library/

If I understand your question clearly; 如果我清楚地理解你的问题;

I think Upload a file using URL isn't a properties of Codeigniter or any other technologies. 我认为使用URL上传文件不是Codeigniter或任何其他技术的属性。 It's about operating system. 这是关于操作系统的。

For example, you have a upload system with generated by PHP and Codeigniter. 例如,您有一个由PHP和Codeigniter生成的上传系统。 When you click Browse button, you can select an image in your computer or you can write an image link hosted on the internet. 单击“ 浏览”按钮时,可以选择计算机中的图像,也可以编写Internet上托管的图像链接。 When you insert an image link, operating system generate a temporary path source (with your image) in your computer. 插入图像链接时,操作系统会在计算机中生成临时路径源(带有图像)。 In Windows, this could be C:/Temp folder. 在Windows中,这可能是C:/Temp文件夹。 Then you can upload your image which you insert its' link. 然后,您可以上传插入其链接的图像。

File Uploading Class 文件上传类

Note: My english is off. 注意:我的英语已关闭。 Sorry for that. 对不起。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM