当前位置: 首页>>代码示例>>PHP>>正文


PHP _generateP3PHeader函数代码示例

本文整理汇总了PHP中_generateP3PHeader函数的典型用法代码示例。如果您正苦于以下问题:PHP _generateP3PHeader函数的具体用法?PHP _generateP3PHeader怎么用?PHP _generateP3PHeader使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_generateP3PHeader函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: MAX_cookieSendP3PHeaders

function MAX_cookieSendP3PHeaders()
{
    if ($GLOBALS['_MAX']['CONF']['p3p']['policies']) {
        MAX_header("P3P: " . _generateP3PHeader());
    }
}
开发者ID:JackyKit,项目名称:revive-adserver,代码行数:6,代码来源:ti.php

示例2: test_generateP3PHeader

 /**
  * Test that the P3P string to be put into the P3P header is generated correctly
  *
  */
 function test_generateP3PHeader()
 {
     $conf =& $GLOBALS['_MAX']['CONF'];
     // Test that nothing is generated if $conf['p3p']['policies'] is false
     $conf['p3p']['policies'] = false;
     $this->assertEqual(_generateP3PHeader(), '');
     // Test that the compact policy header is generated correctly with a compact policy
     // and a policyLocation
     $conf['p3p']['policies'] = true;
     $conf['p3p']['compactPolicy'] = 'CUR ADM OUR NOR STA NID';
     $conf['p3p']['policyLocation'] = 'http://www.openx.org/policy.xml';
     $this->assertEqual(_generateP3PHeader(), ' policyref="' . $conf['p3p']['policyLocation'] . '",  CP="' . $conf['p3p']['compactPolicy'] . '"');
     // Test that the compact policy header is generated correctly with just a compact policy
     $conf['p3p']['policies'] = true;
     $conf['p3p']['compactPolicy'] = 'CUR ADM OUR NOR STA NID';
     $conf['p3p']['policyLocation'] = '';
     $this->assertEqual(_generateP3PHeader(), ' CP="' . $conf['p3p']['compactPolicy'] . '"');
     // Test that the compact policy header is generated correctly with just a policy location
     $conf['p3p']['policies'] = true;
     $conf['p3p']['compactPolicy'] = '';
     $conf['p3p']['policyLocation'] = 'http://www.openx.org/policy.xml';
     $this->assertEqual(_generateP3PHeader(), ' policyref="' . $conf['p3p']['policyLocation'] . '"');
     // Test that the compact policy header is not generated without either policy location or compact policy
     $conf['p3p']['policies'] = true;
     $conf['p3p']['compactPolicy'] = '';
     $conf['p3p']['policyLocation'] = '';
     $this->assertEqual(_generateP3PHeader(), '');
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:32,代码来源:cookie.del.test.php


注:本文中的_generateP3PHeader函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。