我正在使用facebook SDK.我收到以下错误:
Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://
Run Code Online (Sandbox Code Playgroud)
在学习之后,我发现我必须在'facebook login> Setting>'下将'Enforce HTTPS'设置为NO.但我无法将强制HTTPS设置为NO.这个问题来自我的吗?或我facebook限制使用https而不是http?
如何将文本更改Add Your Image
为Change Your Image
.
<label class="control-label col-md-offset-4 col-md-4 btn green feedbackImg" style="text-align:center;">
Add Your Image
<input type="file" name="data[Feedback][img]" class="form-control hide single_img_btn" id="1" style="display: none;">
</label>
Run Code Online (Sandbox Code Playgroud)
$('.feedbackImg').text('Change Your Image');
Run Code Online (Sandbox Code Playgroud)
但它改变了label
如下:
<label class="control-label col-md-offset-4 col-md-4 btn green feedbackImg" style="text-align:center;">
Add Your Image
</label>
Run Code Online (Sandbox Code Playgroud)
这意味着它也删除了输入标签.除了文本之外,我怎么能保持一致?
int i=-1;
int a=65;
int b=a*i + ++i;
Run Code Online (Sandbox Code Playgroud)
b的价值是多少?这里,=,+的关联性是从左到右,*,前缀增量(++)的关联性是从右到左.
那么对于int b = a*i + ++ i,我应该考虑什么样的评估顺序;
左到右?右到左?为什么?
我想申请一个竞赛项目。获奖者将于当月最后一天公布。即:当前月份是十一月。我想显示一条消息,例如:Final declaration will be announced at 30th November 10:00:00 pm
我想30th November 10:00:00 pm
从 php 函数中获取。任何想法?
我的控制器: Controller/appController/OrdersController.php
我有一个名为的函数nocontact()
,我可以将变量传递给nocontact.ctp,如下所示:
$allNoContacts = $result;
$service_charge=$this->ServiceCharge->find('all');
$zero_service_charge=$this->ZeroServiceCharge->find('all');
$zero_service_charge=$zero_service_charge[0]['ZeroServiceCharge']['items'];
$this->set(compact('allNoContacts','service_charge','zero_service_charge'));
Run Code Online (Sandbox Code Playgroud)
如何将此变量传递给OrdersController下的所有视图文件?
HTML:
<div class="radio-list ">
<label class="radio-inline">
<span class=""><input type="radio" name="data[Customer][service_type]" id="service_type" value="new" checked=""></span> NEW INSTALLATION </label>
<label class="radio-inline">
<span class="checked"><input type="radio" name="data[Customer][service_type]" id="service_type" value="repair"></span> SERVICE REPAIR </label>
<label class="radio-inline">
<span class="checked"><input type="radio" name="data[Customer][service_type]" id="service_type" value="cancel"></span> CANCEL SERVICE </label>
<label class="radio-inline">
<span class="checked"><input type="radio" name="data[Customer][service_type]" id="service_type" value="other"></span> OTHER SERVICE </label>
</div>
Run Code Online (Sandbox Code Playgroud)
如何申请变更活动<input type="radio" name="data[Customer][service_type]" id="service_type" value="cancel">
?
<?php
echo $this->Html->css(
array(
'/printPlugin/css/960',
'/printPlugin/css/screen',
'/printPlugin/css/print',
'/printPlugin/src/css/print-preview'
)
);
?>
Run Code Online (Sandbox Code Playgroud)
此代码生成以下HTML:
<link rel="stylesheet" type="text/css" href="/demo-home22/printPlugin/css/960.css" />
<link rel="stylesheet" type="text/css" href="/demo-home22/printPlugin/css/screen.css" />
<link rel="stylesheet" type="text/css" href="/demo-home22/printPlugin/css/print.css" />
<link rel="stylesheet" type="text/css" href="/demo-home22/printPlugin/src/css/print-preview.css" />
Run Code Online (Sandbox Code Playgroud)
我的预期输出是:
<link rel="stylesheet" type="text/css" href="/demo-home22/printPlugin/css/960.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/demo-home22/printPlugin/css/screen.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/demo-home22/printPlugin/css/print.css" media="print" />
<link rel="stylesheet" type="text/css" href="/demo-home22/printPlugin/src/css/print-preview.css" media="screen"/>
Run Code Online (Sandbox Code Playgroud)
这意味着我想media="screen"
在每个CSS链接中添加.
注意:我正在使用cakePHP 3
这是我的示例代码:
$issue_id = $_POST['issue_id'];
if(!empty($issue_id)){
echo 'true';
}
else{
echo 'false';
}
Run Code Online (Sandbox Code Playgroud)
如果我通过0 to $_POST['issue_id']
表单提交,那么它会回显错误。我想要的是:如果满足以下条件,条件将为真:1. 当我传递任何具有 0 的值时为真。2. 当我不传递任何值时为假。即: $_POST['issue_id']
未定义。
我也试过这个:
if(!isset($issue_id)){
echo 'true';
}
else{
echo 'false';
}
if(!empty($issue_id) || $issue==0){
echo 'true';
}
else{
echo 'false';
}
Run Code Online (Sandbox Code Playgroud)
最后一个没问题,这意味着如果我传递任何为零的值,那么它会回显 true。但如果我不传递任何值,它也会回显 true。任何的想法?
我有一个表如下:
正如您所看到的,每列底部都有一些搜索输入字段。我想把它移到上面。即:紧接着<thead> </thead>
.
HTML代码(表格的基本结构,这里只考虑2行共享)是:
<table class="table table-striped table-hover" id="sample_5">
<thead>
<tr>
<th>
Rendering engine
</th>
<th>
Browser
</th>
<th>
Platform(s)
</th>
<th>
Engine version
</th>
<th>
CSS grade
</th>
</tr>
</thead>
<tfoot>
<tr>
<th>
Rendering engine
</th>
<th>
Browser
</th>
<th>
Platform(s)
</th>
<th>
Engine version
</th>
<th>
CSS grade
</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>
Trident
</td>
<td>
Internet Explorer 4.0
</td>
<td>
Win 95+
</td>
<td>
4
</td>
<td>
X
</td>
</tr>
<tr>
<td>
Trident
</td> …
Run Code Online (Sandbox Code Playgroud) 我使用以下命令创建身份验证系统:
php artisan make:auth
Run Code Online (Sandbox Code Playgroud)
效果很好。但是,当我尝试自定义设计和其他内容时,一切对我来说都显得很混乱。即:当我尝试使用错误的凭据时,我无法显示诸如“无效的用户名/密码”之类的消息。我检查了 Auth 文件夹内的所有控制器,但没有详细代码。我的要求非常简单:我只想将错误消息从控制器传递给我的自定义设计的 HTML 模板来查看和显示。这是我的登录表单:
@extends('layouts.login')
@section('content')
<div class="content">
<!-- BEGIN LOGIN FORM -->
<form class="login-form" method="POST" action="{{ route('login') }}">
@csrf
<h3 class="form-title">Login to your account</h3>
CUSTOM_ERROR_MESSAGE_IF_LOGIN_FAILED
<div class="alert alert-danger display-hide">
<button class="close" data-close="alert"></button>
<span>
Enter any username and password. </span>
</div>
<div class="form-group">
<!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
<label class="control-label visible-ie8 visible-ie9">Username</label>
<div class="input-icon">
<i class="fa fa-user"></i>
<!-- <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Username" name="username"/> …
Run Code Online (Sandbox Code Playgroud) cakephp ×2
css ×2
jquery ×2
php ×2
c ×1
facebook ×1
html ×1
html-table ×1
is-empty ×1
laravel ×1
laravel-5 ×1
laravel-form ×1
onchange ×1
radio-button ×1