我是orbeon Forms的新手,我无法将表单嵌入到我的PHP应用程序中。
我的虚拟机安装了ubuntu-server 16.04:
现在我想将我的表单嵌入到我的网站中,所以在我的index.php中我这样做:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<h1>My form:</h1>
<?php
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
echo file_get_contents('https://localhost:8443/orbeon/testapp/form?orbeon-embeddable=true', false, stream_context_create($arrContextOptions));
foreach ($http_response_header as $header){
$groups = [];
if (preg_match('/Set\-Cookie: JSESSIONID=(.*?);/i', $header, $groups)){
setcookie('JSESSIONID', $groups[1], 0, '/orbeon/', '', true, true);
break;
}
}
?>
</body>
</html>
这显示我破碎的形式。我做错了什么?
答案 0 :(得分:1)
遗憾的是,嵌入比这困难得多。有一个旧文档Embedding and Proxying Orbeon Forms,其中包含了一些要做的事情。
Orbeon Forms在Java embedding API中实现了这一点,这是在Scala here as of 2017-05中实现的。
还有一个过时的TYPO3 extension,你可以下载它作为灵感,因为它是用PHP实现的。