こんにちはimはPHPを使用していて、classesフォルダーのclass.phpファイルを自分のページの1つに含めたいのですが、次のようなエラーが表示されます。
警告:require_once(/usr/home/shantak5/public_html/gman/classes/globalProgram.class.php)[function.require-once]:ストリームを開くことができませんでした:/ usr / home / shantak5/public_htmlにそのようなファイルまたはディレクトリはありません18行目の/gman/adminGlobalProgram.php
致命的なエラー:require_once()[function.require]:必要な'/usr/home/shantak5/public_html/gman/classes/globalProgram.class.php'(include_path ='/ usr / home / shantak5 / public_html / gman / 18行目の/usr/home/shantak5/public_html/gman/adminGlobalProgram.phpのPEAR')
私のcode.my.class.phpファイルの何が問題なのかわからないのですがClassesフォルダーにあります。
これがadminglobalprogram.phpのphpコードで、requireonce関数を追加しています。
<?php
require 'config.inc.php';
error_reporting(E_ALL);
if(!$_SESSION['isLogged'])
header("Location: index.php");
if(isset($_GET['hid']) && $_GET['hid'] == 1){
$show = "yes";
}else{
$show = "no";
}
if(isset($_GET['mod'])){
$update = "yes";
$itemId = $_GET['mod'];
}else{
$update = "no";
}
require_once(APP_CLASS_PATH."globalProgram.class.php");
$objForm = new pevcProgram;
$message = "";
if(isset($_POST['saveProgram'])){
$timeval = mysql_real_escape_string($_POST['timeval']);
$timeheading = mysql_real_escape_string($_POST['timeheading']);
$descriptionheading = mysql_real_escape_string($_POST['descriptionheading']);
$description = mysql_real_escape_string($_POST['description']);
$description=stripslashes($description);
$descriptionheading1 = mysql_real_escape_string($_POST['descriptionheading1']);
$description1 = mysql_real_escape_string($_POST['description1']);
$description1=stripslashes($description1);
$descriptionheading2 = mysql_real_escape_string($_POST['descriptionheading2']);
$description2 = mysql_real_escape_string($_POST['description2']);
$description2 =stripslashes($description2);
$descriptionheading3 = mysql_real_escape_string($_POST['descriptionheading3']);
$description3 = mysql_real_escape_string($_POST['description3']);
$description3 =stripslashes($description3);
$image = $_FILES['image']['name'];
if($flag !== 0){
if(!empty($image)){
$bgSource = $_FILES['image']['tmp_name'];
$ext = strtolower(substr(strrchr($image, "."), 1));
if($ext == "png" || $ext == "jpg" || $ext == "jpeg" ){
/* Open This code
$imgpathD = 'photos/'.topBarBgtest.".$ext";
$imgpath = './photos/'.topBarBgtest.".$ext";
*/
$imgpathD = 'photos/program/'.'Global_'.$image;
$imgpath = './photos/program/'.'Global_'.$image;
if(move_uploaded_file($bgSource, $imgpath)){
//$message .= "Image successfully uploaded.<br />";
}else{
$flag = 0;
}
}else{
$flag = 0;
}
}
}
//$content = mysql_real_escape_string($_POST['FCKeditor1']);
$line = $_POST['line'];
$srorder = $_POST['srorder'];
$status = $_POST['status'];
$fieldInfo = array(
'timeval' => $timeval,
'timeheading' => $timeheading,
'descriptionheading'=>$descriptionheading,
'description' => $description,
'descriptionheading1'=>$descriptionheading1,
'description1' => $description1,
'descriptionheading2'=>$descriptionheading2,
'description2' => $description2,
'descriptionheading3'=>$descriptionheading3,
'description3' => $description3,
'image' => $image,
'line' => $line,
'srorder' => $srorder,
'status' => $status);
$recId = $objForm->addFormField($fieldInfo);
if(isset($recId) && $recId != ""){
$message .= "Form successfully saved!!.<br />";
}else{
$message .= "Error!Form data not saved.Please try again!!.<br />";
}
}
if(isset($_POST['update']))
{
//$content = mysql_real_escape_string($_POST['FCKeditor1']);
$timeval = mysql_real_escape_string($_POST['timeval']);
$timeheading = mysql_real_escape_string($_POST['timeheading']);
$descriptionheading = mysql_real_escape_string($_POST['descriptionheading']);
$description = mysql_real_escape_string($_POST['description']);
$description=stripslashes($description);
$line = $_POST['line'];
$descriptionheading1 = mysql_real_escape_string($_POST['descriptionheading1']);
$description1 = mysql_real_escape_string($_POST['description1']);
$description1 =stripslashes($description1);
$descriptionheading2 = mysql_real_escape_string($_POST['descriptionheading2']);
$description2 = mysql_real_escape_string($_POST['description2']);
$description2 =stripslashes($description2);
$descriptionheading3 = mysql_real_escape_string($_POST['descriptionheading3']);
$description3 = mysql_real_escape_string($_POST['description3']);
$description3 =stripslashes($description3);
//image uploade//
$image = $_FILES['image']['name'];
if($flag !== 0){
if(!empty($image)){
$bgSource = $_FILES['image']['tmp_name'];
$ext = strtolower(substr(strrchr($image, "."), 1));
if($ext == "png" || $ext == "jpg" || $ext == "jpeg" ){
/* Open This code
$imgpathD = 'photos/'.topBarBgtest.".$ext";
$imgpath = './photos/'.topBarBgtest.".$ext";
*/
$imgpathD = 'photos/program/'.'Global_'.$image;
$imgpath = './photos/program/'.'Global_'.$image;
if(move_uploaded_file($bgSource, $imgpath)){
//$message .= "Image successfully uploaded.<br />";
}else{
$flag = 0;
}
}else{
$flag = 0;
}
}
}
$srorder = $_POST['srorder'];
$status = $_POST['status'];
$updId = $_POST['updId'];
$fieldInfo = array('timeval' => $timeval,
'timeheading' => $timeheading,
'descriptionheading'=>$descriptionheading,
'description' => $description,
'descriptionheading1'=>$descriptionheading1,
'description1' => $description1,
'descriptionheading2'=>$descriptionheading2,
'description2' => $description2,
'descriptionheading3'=>$descriptionheading3,
'description3' => $description3,
'image' => $image,
'line' => $line,
'srorder' => $srorder,
'status' => $status);
$recId = $objForm->updateFormInfo($updId,$fieldInfo);
if(isset($recId) && $recId != "")
{
$message .= "Form successfully updated!!.<br />";
}else
{
$message .= "Error!Form data not updated.Please try again!!.<br />";
}
}
/*unset($_GET['update']);*/
/* srorder update accroding text input*/
if(isset($_POST['textsubmit']))
{
//$content = mysql_real_escape_string($_POST['FCKeditor1']);
$timeval = mysql_real_escape_string($_POST['timeval']);
$timeheading = mysql_real_escape_string($_POST['timeheading']);
$descriptionheading = mysql_real_escape_string($_POST['descriptionheading']);
$description = mysql_real_escape_string($_POST['description']);
$description=stripslashes($description);
$descriptionheading1 = mysql_real_escape_string($_POST['descriptionheading1']);
$description1 = mysql_real_escape_string($_POST['description1']);
$description1 =stripslashes($description1);
$descriptionheading2 = mysql_real_escape_string($_POST['descriptionheading2']);
$description2 = mysql_real_escape_string($_POST['description2']);
$description2 =stripslashes($description2);
$descriptionheading3 = mysql_real_escape_string($_POST['descriptionheading3']);
$description3 = mysql_real_escape_string($_POST['description3']);
$description3 =stripslashes($description3);
//image uploade//
$image = $_FILES['image']['name'];
if($flag !== 0){
if(!empty($image)){
$bgSource = $_FILES['image']['tmp_name'];
$ext = strtolower(substr(strrchr($image, "."), 1));
if($ext == "png" || $ext == "jpg" || $ext == "jpeg" ){
/* Open This code
$imgpathD = 'photos/'.topBarBgtest.".$ext";
$imgpath = './photos/'.topBarBgtest.".$ext";
*/
$imgpathD = 'photos/program/'.'Global_'.$image;
$imgpath = './photos/program/'.'Global_'.$image;
if(move_uploaded_file($bgSource, $imgpath)){
//$message .= "Image successfully uploaded.<br />";
}else{
$flag = 0;
}
}else{
$flag = 0;
}
}
}
$line = $_POST['line'];
$srorder = $_POST['srorder'];
$status = $_POST['status'];
$updId = $_POST['updId'];
$fieldInfo = array('timeval' => $timeval,
'timeheading' => $timeheading,
'descriptionheading'=>$descriptionheading,
'description' => $description,
'descriptionheading1'=>$descriptionheading1,
'description1' => $description1,
'descriptionheading2'=>$descriptionheading2,
'description2' => $description2,
'descriptionheading3'=>$descriptionheading3,
'description3' => $description3,
'image' => $image,
'line' => $line,
'srorder' => $srorder,
'status' => $status);
$recId = $objForm->updateFormInfo($updId,$fieldInfo);
if(isset($recId) && $recId != "")
{
$message .= "Form successfully updated!!.<br />";
}else
{
$message .= "Error!Form data not updated.Please try again!!.<br />";
}
}
if(isset($_GET['Rmod'])){
$itemId = $_GET['Rmod'];
$formretu = $objForm->deleteRec($itemId);
if($formretu){
$message .= "Record successfully Deleted!!.<br />";
}else{
$message .= "Record not Deleted!!.<br />";
}
}
if($update == "yes"){
$formArr = $objForm->getFormInfo($itemId);
$timeval = $formArr->timeval;
//$content = $formArr->content;
//$content = stripslashes($content);
$timeheading = $formArr->timeheading;
$descriptionheading = $formArr->descriptionheading;
$description = $formArr->description;
$descriptionheading1 = $formArr->descriptionheading1;
$description1 = $formArr->description1;
$descriptionheading2 = $formArr->descriptionheading2;
$description2 = $formArr->description2;
$descriptionheading3 = $formArr->descriptionheading3;
$description3 = $formArr->description3;
$image = $formArr->image;
$line = $formArr->line;
$srorder = $formArr->srorder;
$status = $formArr->status;
}
$asiaArr = $objForm->getAllAsiaProg1();
$upNUM = $objForm->isRecord();
$upNUM = $upNUM;
$recNum = $objForm->isRecord();
$recNum = $recNum + 1;
//print_r($_SESSION);
$smarty->assign('show', $show);
$smarty->assign('update', $update);
$smarty->assign('timeval', $timeval);
$smarty->assign('timeheading', $timeheading);
$smarty->assign('descriptionheading', $descriptionheading);
$smarty->assign('description', $description);
$smarty->assign('descriptionheading1', $descriptionheading1);
$smarty->assign('description1', $description1);
$smarty->assign('descriptionheading2', $descriptionheading2);
$smarty->assign('description2', $description2);
$smarty->assign('descriptionheading3', $descriptionheading3);
$smarty->assign('description3', $description3);
$smarty->assign('image', $image);
//$smarty->assign('content', $content);
$smarty->assign('line', $line);
$smarty->assign('srorder', $srorder);
$smarty->assign('status', $status);
$smarty->assign('asiaArr', $asiaArr);
$smarty->assign('itemId', $itemId);
$smarty->assign('upNUM', $upNUM);
$smarty->assign('recNum', $recNum);
//$smarty->assign('content', $newContent);
$smarty->assign('message', $message);
//$smarty->assign('sno', $sno);
$smarty->display('adminGlobalProgram.tpl');
?>