本文整理匯總了PHP中f::getPatchApp方法的典型用法代碼示例。如果您正苦於以下問題:PHP f::getPatchApp方法的具體用法?PHP f::getPatchApp怎麽用?PHP f::getPatchApp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類f
的用法示例。
在下文中一共展示了f::getPatchApp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: imagecreatetruecolor
<?php
require_once './core/helper/f.php';
f::import('core/helper/Cifrar.php');
$random1 = Cifrar::random(4, 'int');
$random2 = Cifrar::random(4, 'int');
$texto = $random1 . ' ' . $random2;
$width = 149;
$height = 27;
$image = imagecreatetruecolor($width, $height);
$font = f::getPatchApp() . '/resource/plugin/reCaptcha/fonts/Courier.ttf';
$black = imagecolorallocate($image, 0, 0, 0);
// color negro
$white = imagecolorallocate($image, 255, 255, 255);
// background color blanco
//$black=$white;
imagefilledrectangle($image, 0, 0, $width, $height, $white);
$lineas = mt_rand(10, 15);
for ($i = 0; $i < $lineas; $i++) {
$max = mt_rand(80, 100);
$r = mt_rand(100, 200);
$g = mt_rand(100, 200);
$b = mt_rand(100, 200);
$linescolor = imagecolorallocatealpha($image, $r, $g, $b, $max);
$x1 = mt_rand(0, $width);
$y1 = mt_rand(0, $height);
$x2 = mt_rand(0, $width);
$y2 = mt_rand(0, $height);
imageline($image, $x1, $y1, $x2, $y2, $linescolor);
}
$aumentar = 16;