使用PHP将$ _FILES或$ _POST传递到新页面 [英] Passing $_FILES or $_POST to a new page with PHP

查看:76
本文介绍了使用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 创建帐户,获取新的accountID 附加到原始帖子的其他信息 发送到上传页面以自动上传文件,然后再上传到其主页

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.

有什么建议吗?

谢谢

推荐答案

将其放入会话变量...

put it in session variable...

$_SESSION['file']=$_FILE['....']

阅读 这也..

这篇关于使用PHP将$ _FILES或$ _POST传递到新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆