第一段:用file_get_contents以get方式获取内容,需要输入内容为:
①.、?php
第二段:用file_get_contents函数,以post方式获取url,需要输入内容为
①.0、?'content'=$data
①.1、)
第三段:用fopen打开url,以get方式获取内容,需要输入内容为
①.0、?
第四段:用fopen打开url,以post方式获取内容,需要输入内容为
①.0、)
①.1、);
第五段:用fsockopen函数打开url,以get方式获取完整的数据,包括header和body,需要输入内容为
①.0、}else{
①.1、$request="GET$queryHTTP/1.1\r\n";
参考资料:
php-file_get_contents
//A表m的值
$m = 1;
$result = mysql_query("select n from B where x in(select x from A where m={$m})");
$rs = mysql_fetch_assoc($result);
$n = $rs['n'];
//B表n的值
echo $n;
一个表单无法同时提交多个页面,只有提交给一个页面后,再提交给下一个页面,就象安装软件时候的"下一步"一样,是一步一步的传递的.
php文件获取"上一步"表单传递来的数据,方法是使用数组$_get和$_post,例如表单里面有inputtype=textname=uservalue=abc,那么在php里面就有$_get["user"]或者$_post["user"](根据表单的提交方法),其值为"abc".
:
$query = $this-db-get('Table1')-result(); // get first table
foreach($query as $result)
{
//Your Post Values from form data in array : POST_DATA
$data = array_merge($result,$post_data);
}
今天这一节我已经在我的基础模型中定义了array_from_post,您可以像这样使用它:
public function array_from_post($fields){
$data = array();
foreach ($fields as $field) {
$data[$field] = $this-input-post($field);
return $data;
以上就是土嘎嘎小编为大家整理的php获取另一个表单数据相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!