我是php的新手,我希望得到一些帮助。
<?php require_once("../includes/session.php"); ?>
<?php require_once("../includes/db_connection.php"); ?>
<?php require_once("../includes/functions.php"); ?>
<?php
if(isset($_GET["subject"])){
$selected_subject_id=$_GET["subject"];
$selected_page_id=null;
}elseif(isset($_GET["page"])){
$selected_page_id=$_GET["page"];
$selected_subject_id=null;
}else{
$selected_subject_id=null;
$selected_page_id=null;
}
?>
<?php
if(!$selected_subject_id){
redirect_to("manage_content.php");
}
?>
<h2>Edit Subject: <?php echo $selected_subject_id["menu_name"]; ?></h2>
这是错误:
编辑主题:
警告:非法字符串偏移&#39; menu_name&#39;在第21行的/?????/public_html/??/publi/edit_subject.php 1