我有一个名为traitement.php的php文件,其中我首先包含了verifIban.php,然后是fonction.php
在traitement.php中,我有这条线:
//in traitement.php
include('../verifIban.php');
include('fonction.php');
echo 'test';
$controle = controleIBAN($tableIBAN,$tableBIC);
echo 'test1';
回声仅供我查看问题所在。 controleIBAN()在fonction.php中 这个fonction controleIBAN()有这一行:
//in function.php
function controleIBAN($tableIBAN, $tableBIC){
echo 'test2';
$IBANVerifie = verif_iban_masse($tableIBAN[$i]);
echo 'test3';
//other commands
}
verif_iban_masse()是用verifIban.php编写的。而这个函数verif_iban_masse()特别包含这一行:
//in verifIban.php
function verif_iban_masse($str){
echo 'test4';
$reponse = $bdd->query("SELECT IBAN_national_id_length, IBAN_country_code, IBAN_total_length, IBAN_bank_identifier_position, fr_name, is_iban, is_iso FROM country WHERE iso_code = '".substr($str,0,2)."'");
echo 'test5';
//other commands
}
当我调用traitement.php时,我只得到这个输出:
testtest2test4
所以我认为BBD请求存在问题。但是当我做的时候
$toto = verif_iban_masse('FR123456789');
echo $toto;
在verifIban.php中的我有正确的输出,所以BBD请求正在运行......
这件事在两周前开始工作,我们没有做任何改变,现在却没有......
如果你能帮助我找出问题所在。
谢谢
编辑: 这是verif_iban_masse()
的开始function verif_iban_masse($str){
include("../co_scripts/co_bdd.php");
if (strlen(trim(str_replace(' ', '',$str))) < 8 OR strlen(trim(str_replace(' ', '',$str)))>35){
return 'La longueur de la saisie est incorrect';
}
echo 'test4';
$reponse = $bdd->query("SELECT IBAN_national_id_length, IBAN_country_code, IBAN_total_length, IBAN_bank_identifier_position, fr_name, is_iban, is_iso FROM country WHERE iso_code = '".substr($str,0,2)."'");
echo 'test5';
//other commands
}
所以,我认为$ bdd来自与数据库的连接。