我正在尝试使用php中的textlocal api发送短信。它工作正常,并且在本地发送短信。上传后,它不起作用。出现这些错误
警告:require(php-in \ Textlocal.class.php):无法打开流:在第6行的/home/cpdarmkr/public_html/danceschool/message.php中没有此类文件或目录
警告:require(php-in \ Textlocal.class.php):无法打开流:在第6行的/home/cpdarmkr/public_html/danceschool/message.php中没有此类文件或目录
严重错误:require():无法在/ home / cpdarmkr /中打开所需的'php-in \ Textlocal.class.php'(include_path ='。:/ opt / alt / php71 / usr / share / pear')第6行的public_html / danceschool / message.php
<?php include('dbc.php');?>
<?php
error_reporting(E_ALL); ini_set('display_errors', 1);
require('php-in/Textlocal.class.php');
//require('php-in\Textlocal.class.php');
//require('consultantnext.com/danceschool/php-in/Textlocal.class.php');
$sql="SELECT *
FROM admin t1, batchinfo t2
WHERE t1.batchname= t2.batchname
AND t1.branchname= t2.branchname";
$result= mysqli_query($conn,$sql)
or die($sql."<br/><br/>".mysql_error());
If(mysqli_num_rows($result)>0) {
while($row=mysqli_fetch_array($result)) {
//echo $row['mobile'];
$mobile=$row['mobile'];
$time=$row['time'];
//echo $time;
$numbers=(explode(" ",$mobile));
foreach ($numbers as $item) {
echo $item;
}
$Textlocal = new Textlocal(false, false, 'e34FsEpkeUo-
uLJ17oDYeEgHBucRHTnNtHhrE39Pj4');
//$numbers = array(919384191234,918056377914);
$sender = 'TXTLCL';
$message = "Dear student your class schedule for tomorrow '$time'";
$response = $Textlocal->sendSms($numbers, $message, $sender);
print_r($response);
//echo $message;
}
}
?>
<?php
$sql="SELECT * FROM admin
WHERE username NOT IN (
SELECT studentname
FROM transcation
WHERE MONTH(DATE(date))=MONTH(CURDATE())
)
and usertype='student' ";
$result= mysqli_query($conn,$sql)
or die($sql."<br/><br/>".mysql_error());
If(mysqli_num_rows($result)>0) {
while($row=mysqli_fetch_array($result)) {
$username=$row['username'];
echo $username;
$mobile=$row['mobile'];
$numbers=(explode(" ",$mobile));
foreach ($numbers as $item) {
echo $item;
}
$Textlocal = new Textlocal(false, false, 'e34FsEpkeUo-
uLJ17oDYeEgHBucRHTnNtHhrE39Pj4');
$sender = 'TXTLCL';
$message = "Dear student please pay the fees before due date. ";
$response = $Textlocal->sendSms($numbers, $message, $sender);
print_r($response);
}
}
?>