我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何使用苗条的$ _FILES []

I'm trying to take data from a form by post with slim, but the documentation does not show how to use the $_FILES[], I can take the name of the file but does not move to the folder.

 $app->post('/publicar', function () use ($app, $db){

  $img = $_FILES['img']['name'];
  $ruta = $_FILES['img']['tmp_name'];
  $destino = "images/".$img;
  move_uploaded_file($ruta, $destino);
});

近期文章

  • 对Zoho API CRM没有任何回应
  • 从特定行获取求和值
  • PHP - 如果信息已存在于数组中,请显示该信息
  • too long
  • try_file没有使用fastcgi
  • 基于登录表单在php中返回布尔值
  • 通过PHP集成Paypal Express Checkout
  • 在加载动态php内容之前运行Jquery / Ajax
  • Laravel Ajax请求返回整个页面而不仅仅是数据
  • 用于后代或自我的xpath,同时保持文本的顺序相同
  • pear mail脚本无法打开流错误
  • substring max 25 chars,如果匹配模式,则保持字符串的结尾
  • 用于检查页面上断开的链接的PHP脚本
  • Facebook PHP SDK - getUser()从Facebook注销后返回有效的userId
  • PHP将数据发布到两个不同的页面
  • php全局变量与'sourced'php文件
  • 如何显示格式化的html标签
  • 如何获取数据表格行(HTML)?
  • 类别和子节点drupal 6
  • 通过ajax post将div Html和Css保存在数据库中。

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华