托管时php不返​​回响应

时间:2018-07-11 10:34:24

标签: php arrays response cpanel

我的android服务器端PHP代码在本地PC的xampp服务器上运行良好,但是当我将其上传到cPanel时它不会返回响应

<?php
require '../databaseConnector/databaseConnector.php';

$codes=$_POST["codes"];

$statement=mysqli_prepare($con, "SELECT * FROM product_codes WHERE $codes = ?");
mysqli_stmt_bind_param($statement, "s", $codes);
mysqli_stmt_execute($statement);

mysqli_stmt_store_result($statement);
mysqli_stmt_bind_result($statement, $id, $codes);

$response=array();
$response["success"]=false;

while(mysqli_stmt_fetch($statement)){
    $response["success"]=true;
    $response["codes"]=$codes;
}
echo json_encode($response);  ?>

cPanel上显示错误

log[Wed Jul 11 06:45:40.608669 2018] [:error] [pid 7330:tid 140534072993536] [client 41.204.187.12:10436] SoftException in Application.cpp:267: File "/home/barnsley/smartscanner/checkvalidity/validity.php" is writeable by group

1 个答案:

答案 0 :(得分:0)

将文件权限更改为644,以便可以执行文件

Proper permissions for web server's directories and files