Bluemix PHP JQuery许可证错误



我正在bluemix-devOps中构建一个验证表单。我使用jQuery和php来检查数据库中是否已经有一个现有的电子邮件地址。使用此代码:

if(error == 0){
            $.post('validateEmail.php', {uEmail:email}, function(data){
                alert(data);
                if(parseInt(data) > 0){
                    $("input[name='email']").after("<div class='emailInput validationError'>"+span_error_start+errormsg[8]+span_error_end+"</div>").addClass("input_error");
                }
                else{
                    $(".myForm").submit();
                }

因此,当数据库中已经有一封电子邮件时,它会给我一个1,否则,当我提醒数据时,它就会给我0

  Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
       http://www.apache.org/licenses/LICENSE-2.0
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
  -->
with a 1 or a 0.

因为它给了我这个文本,所以我的IF语句不起作用。有人知道这个错误吗?

我发现了这个问题,我在数据库连接中包含了一个php维奇,而该文件中出现了文本。所以我删除了那个文本,代码就工作了!

最新更新