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


PHP Captcha::img方法代码示例

本文整理汇总了PHP中Captcha::img方法的典型用法代码示例。如果您正苦于以下问题:PHP Captcha::img方法的具体用法?PHP Captcha::img怎么用?PHP Captcha::img使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Captcha的用法示例。


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

示例1: function

    });
    # 字典管理
    Route::group(array('prefix' => 'dicts'), function () {
        $controller = 'AdminDictController@';
        Route::get('/', array('as' => 'dicts.index', 'uses' => $controller . 'index'));
        Route::get('/tables', array('as' => 'dicts.dataTables', 'uses' => $controller . 'dataTables'));
        Route::post('/store', array('as' => 'dicts.store', 'uses' => $controller . 'store'));
    });
});
/*
|--------------------------------------------------------------------------
| Common
|--------------------------------------------------------------------------
*/
Route::any('/captcha', function () {
    if (Request::getMethod() == 'POST') {
        $rules = array('captcha' => array('required', 'captcha'));
        $validator = Validator::make(Input::all(), $rules);
        if ($validator->fails()) {
            echo '<p style="color: #ff0000;">Incorrect!</p>';
        } else {
            echo '<p style="color: #00ff30;">Matched :)</p>';
        }
    }
    $content = Form::open(array(URL::to(Request::segment(1))));
    $content .= '<p>' . HTML::image(Captcha::img(), 'Captcha image') . '</p>';
    $content .= '<p>' . Form::text('captcha') . '</p>';
    $content .= '<p>' . Form::submit('Check') . '</p>';
    $content .= '<p>' . Form::close() . '</p>';
    return $content;
});
开发者ID:Kangaroos,项目名称:oneshike,代码行数:31,代码来源:routes.php

示例2: newCaptcha

 /**
  * create new captcha image and display it alone
  *
  * @return Illuminate\Http\Response
  */
 public function newCaptcha()
 {
     $response = Response::make(HTML::image(Captcha::img(), 'Captcha image'));
     $response->header('Content-Type', 'image/png');
     return $response;
 }
开发者ID:hrenos,项目名称:spreadit,代码行数:11,代码来源:UtilityController.php

示例3: array

                            <?php 
echo $errors->first('email');
?>
                        </p>
                        <div class="form-group">
                            <span class="icons-sprite icons-account"></span>
                            <input name="email" type="text" placeholder="请输入注册邮箱">
                        </div>
                        <div class="form-group">
                            <span class="icons-sprite icons-password"></span>
                            <input autocomplete="off" name="captcha" type="text" placeholder="请输入验证码">
                        </div>
                        <div class="form-group box-form-tools">
                            <div>
                                <?php 
echo HTML::image(Captcha::img(), '验证码', array('id' => 'captcha'));
?>
                            </div>
                            <a href="#" ms-click="changeCaptcha">看不清,换一张!</a>
                        </div>
                        <div class="form-group box-form-buttons">
                            <button type="submit">提交</button>
                            <a href="/">返回网站</a>
                        </div>
                    </div>
                </form>
            </td>
        </tr>
    </table>
    <script>
        var vm = avalon.define({
开发者ID:safarishi,项目名称:Api-Via-Laravel-4.2.17,代码行数:31,代码来源:find.blade.php

示例4: close

		<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d492.3484785570445!2d35.51444356651267!3d33.88675468437674!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zMzPCsDUzJzEyLjEiTiAzNcKwMzAnNTMuMCJF!5e0!3m2!1sen!2s!4v1446459647170" class="hidden-xs hidden-sm" width="600" height="450" style="border:0" allowfullscreen></iframe>
		<div class="row">
			<h2>When can we visit you ?</h2>
            <div class="form-group contact-form">
                <div class='input-group date' id='datetimepicker'>
                    <input type='text' class="form-control" name="date_client" style="margin-bottom:0;"/>
                    <span class="input-group-addon" style="float:none; background-color: transparent; border-color:#eee">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
		</div>
		<div class="row">
			<h2>One last step to make sure you're human !</h2>
			<div class="form-group contact-form" style="width: 240px;">
		        <img src="<?php 
echo Captcha::img();
?>
" alt='Captcha image'>
			    <input type='text' class="form-control" placeholder="Type the above code" name="captcha"/>
			</div>		
		</div><br><br><br>
		<div class="row contact-form">
			<button name="submit_form" type="submit" class="green-btn btn btn-primary">Submit Request</button>
		</div>
	</div>
  {{ Form:: close() }}

</div>

@stop
开发者ID:Webneoo,项目名称:lifequo,代码行数:31,代码来源:index.blade.php


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