本文整理汇总了PHP中Foo::foo1方法的典型用法代码示例。如果您正苦于以下问题:PHP Foo::foo1方法的具体用法?PHP Foo::foo1怎么用?PHP Foo::foo1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Foo
的用法示例。
在下文中一共展示了Foo::foo1方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foo1
if (!$data) {
return false;
}
$crypt = base64_decode($data);
//Optional Part, only necessary if you use other encryption mode than ECB
$iv_size = mcrypt_get_iv_size($this->Algo, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$decrypt = mcrypt_decrypt($this->Algo, $this->Key, $crypt, MCRYPT_MODE_ECB, $iv);
return trim($decrypt);
}
}
//Creating a new instance of the crypter with RIJNDAEL_256 encryption
$userPost = $_POST["user"];
$crypter = new Crypter($passphrase, MCRYPT_RIJNDAEL_256);
$foo = new Foo();
$foo->foo1();
$foo->foo2();
class foo
{
public function foo1()
{
$i = 0;
$userCount = $GLOBALS["userCount"];
while ($i < $userCount) {
$data = "user" . $i;
$export = "safeUser" . $i;
$data = $GLOBALS[$data];
$GLOBALS[$export] = $GLOBALS["crypter"]->Encrypt($data);
$i = $i + 1;
}
}
示例2:
<?php
//
// simple static methods: wrappers around sinks
Foo::foo1($evil, "ok");
class Foo extends Bar
{
function foo1($fp1, $fp2)
{
echo $fp1;
echo $fp2;
echo $_GET['x'];
}
}
示例3:
<? //
// simple methods: wrappers around sinks
$f = new Foo;
$f->foo1($evil, "ok");
class Foo extends Bar {
function foo1($fp1, $fp2) {
echo $fp1;
echo $fp2;
echo $_GET['x'];
}
}
?>