Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/153.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 将数据发布到同一站点上的另一个Joomla页面_Php_Joomla - Fatal编程技术网

Php 将数据发布到同一站点上的另一个Joomla页面

Php 将数据发布到同一站点上的另一个Joomla页面,php,joomla,Php,Joomla,我有一个Joomla控制器,它对一些Google Checkout XML代码进行多次迭代。我想要的是在这个迭代过程中,将数据发布到另一个页面——在同一个站点中 所以 iterator.php控制器将向executor.php发送数据,可能会发送2次甚至50次 如何实现这一点?要在php中将数据发布到页面,您可以使用扩展名一种快速而肮脏的方式可能是这样的 $c = curl_init(); curl_setopt($c, CURLOPT_URL, 'com_mycomponent/control

我有一个Joomla控制器,它对一些Google Checkout XML代码进行多次迭代。我想要的是在这个迭代过程中,将数据发布到另一个页面——在同一个站点中

所以

iterator.php控制器将向executor.php发送数据,可能会发送2次甚至50次


如何实现这一点?

要在php中将数据发布到页面,您可以使用扩展名一种快速而肮脏的方式可能是这样的

$c = curl_init();
curl_setopt($c, CURLOPT_URL, 'com_mycomponent/controllers/checkout_executor.php');
curl_setopt($c, CURLOPT_HEADER, false);
curl_setopt($c, CURLOPT_POST, true);

// send data
curl_setopt($c, CURLOPT_POSTFIELDS, 'a=1&b=2..');
curl_exec($c);
// other data.. we can use same handle
curl_setopt($c, CURLOPT_POSTFIELDS, 'a=1&b=2..');
curl_exec($c);

// don't forget to close
curl_close($c);
$c = curl_init();
curl_setopt($c, CURLOPT_URL, 'com_mycomponent/controllers/checkout_executor.php');
curl_setopt($c, CURLOPT_HEADER, false);
curl_setopt($c, CURLOPT_POST, true);

// send data
curl_setopt($c, CURLOPT_POSTFIELDS, 'a=1&b=2..');
curl_exec($c);
// other data.. we can use same handle
curl_setopt($c, CURLOPT_POSTFIELDS, 'a=1&b=2..');
curl_exec($c);

// don't forget to close
curl_close($c);