Passing $_FILES or $_POST to a new page with PHP(使用 PHP 将 $_FILES 或 $_POST 传递到新页面)
问题描述
我目前正在为客户构建现有脚本的新部分.目前,在用户填写一些帐户创建信息后,他们会被定向到一个页面,他们可以在该页面上上传文件并发送文件,有点像文件共享网络.发送/创建的 $_POST 变量的传递不是问题,我想做的是允许他们创建一个帐户并从一个表单上传文件.所以这个过程将是
I am currently building a new part of an existing script for a client. Currently after a users fills in some account creation info they are directed to a page where they can upload a file and send it, sort of like a file sharing network. The passing of the $_POST variables that are sent / created isn't the issue, what I am trying to do is allow them to create an account and upload a file all from one form. So the process will be
填写表格去createaccount.php创建账号,获取新账号ID附加到原始帖子中的其他信息发送到上传页面自动上传文件然后到他们的主页
fill in form goes to createaccount.php create account, get new accountID attach to other info from original post send to the upload page to upload file automatically then to their home page
主要问题是如何传递他们最初上传的 $_FILE 以及所有这些?我需要传递它,所以我不必重写上传脚本.
The main question is how can I pass the $_FILE that they originally uploaded along with all of this? I need to pass it along so I don't have to rewrite the uploading script.
有什么建议吗?
谢谢
推荐答案
放到会话变量中...
$_SESSION['file']=$_FILE['....']
阅读本文这也是..
这篇关于使用 PHP 将 $_FILES 或 $_POST 传递到新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 PHP 将 $_FILES 或 $_POST 传递到新页面


- 没有作曲家的 PSR4 自动加载 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- Laravel 仓库 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01