0

我正在尝试将数据存储在 vtiger 潜在客户模块中。我可以通过 file_get_contents() 发送变量,但它不起作用。这是我的代码

$moduleName = $_POST['moduleName']; 
$company    = $_POST['company']; 
$firstname  = $_POST['firstname'];
$lastname   = $_POST['lastname']; 
$website    = $_POST['website']; 
$phone      = $_POST['phone']; 
$email      = $_POST['email']; 
$city       = $_POST['city']; 
$state      = $_POST['state'];
$code       = $_POST['code']; 

$post = http_build_query(array(

"firstname" => "$firstname",
"lastname" => "$lastname",
"website"=>"$website",
"phone"=>"$phone",
"email"=>"$email",
"city"=>"$city",
"state"=>"$state",
"code"=>"$code",
 "moduleName" => "$moduleName",
   "company " => "$company",

));

 $context = stream_context_create(array("http"=>array(
 "method" => "POST",
 "header" => "Content-Type: application/x-www-form-urlencoded\r\n" .
             "Content-Length: ". strlen($post) . "\r\n",  
 "content" => $post,
))); 

$page = file_get_contents("http://vtiger.com/modules/Webforms/post.php", false, $context);

请帮我。

4

1 回答 1

0

正确使用网络表单,在 vtiger 5.4 中,您可以使用其界面轻松创建网络表单。oru 用户 vtiger 网络服务来创建、编辑、删除数据

于 2013-01-08T06:50:33.177 回答