本文整理匯總了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'];
}
}
?>