0
からPHPファイルにアクセスしようとしたときに、私はアンドロイド側やGoogle Chromeからの私のPHPファイルにアクセスすることはできませんし、私はのerror_logファイルに次のエラーを取得:がPHPの致命的なエラーを取得:(必要)サーバー
[12-Dec-2016 13:41:53 UTC] PHP Warning: require(./Classes/Classes.php): failed to open stream: No such file or directory in /home/shaye/public_html/social/index.php on line 12
[12-Dec-2016 13:41:53 UTC] PHP Warning: require(./Classes/Classes.php): failed to open stream: No such file or directory in /home/shaye/public_html/social/index.php on line 12
[12-Dec-2016 13:41:53 UTC] PHP Fatal error: require(): Failed opening required './Classes/Classes.php' (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in /home/shaye/public_html/social/index.php on line 12
を
そしてまた、これは私のindex.phpファイルです:
<?php ob_start(); header("charset=utf-8;");
$dir = str_replace("index.php","",$_SERVER['PHP_SELF']);
$params = str_replace($dir,"",$_SERVER['REQUEST_URI']);
$params = trim($params,"/");
$params = explode("/",$params);
if(isset($params[0]) && isset($params[1]))
{
require './Classes/'.basename($params[0]).".php";
$class = new $params[0]();
$class->$params[1]();
}
else
{
exit;
}
?>
そして、これは、サーバーの私のPHPファイルのアドレスです:
shayea.tk/social/Classes/
そして私は、Android側で をMultipartUtilityライブラリを使用しています、私はパスが、それは以下のようなことも一致していないと思うもう一度
require './Classes/'.basename($params[0]).".php";
を次の行を確認してください、私はPHP