PHP服务器错误505正在显示

时间:2016-01-05 12:17:36

标签: php

这是我的代码。页面正在加载但不是内容。

<?php
ob_start();
include ('includes/dbconnect.php');
?>

<center><h1> EACH STUDENT'S PROFILE</h1></center>

<?php

// if id (which i used in the href link in excoslist.php) is not set ,     redirect back to index page

        if (!isset($_GET['id'])) {
        header ("location:ebcchic.php");            //redirect me back to     index.php

    }

            // select all details belonging to the selected id
            // basically for those who are under the  same category, eg, 
            //those excos of the same year.

            // i can do the below so that all the list will be listed at      once 
            //but the excosname on line 40 will be removed, 



            $stuprofile_sql = "SELECT stuprofile.firstname, 
            stuprofile.lastname, 
            stuprofile.username,
            stuprofile.password,
            stuprofile.id, 
            stuprofile.sex,
            stuprofile.address,
            stuprofile.email, 
            stuprofile.institution,
            stuprofile.chapter,
            stuprofile.baptised, 
            stuprofile.baptism,
            stuprofile.bank,
            stuprofile.teller_no,
            stuprofile.payment_date,
            stuprofile.local_church, 
            stuprofile.marital_status,
            stuprofile.mobile,
            ebc.firstname AS student_name
            FROM stuprofile 
            right JOIN ebc 
            ON stuprofile.id= ebc.id 
            WHERE stuprofile.id= ". $_GET['id'];

            // echo $details_sql;



            if ($stuprofile_query= mysqli_query($dbconnect,    $stuprofile_sql))  {
                $stuprofile_fetch=mysqli_fetch_assoc($stuprofile_query);    // this line will be arranging our results for us.

            } 


             if ( mysqli_num_rows ($stuprofile_query)==0){
                 echo " the name you are requesting is not available";

             } else {
                 ?>

                 <h1><center><?php echo $stuprofile_fetch ['student_name'];

             }
        ?>

  </h1></center>

        <?php

       // now lets display the list

    $id= ". $_GET['id']";
    echo $id;

        do 
            ?>
            <!--use this method & div to position your student profile page eso the passport . also this page too-->
            <h3><div class= 'firstname'>


        <!--<a href= "officers.php?page=moredetails&id=<?php echo $id; ?>"> -->


        <p>MATRIC NUMBER: EBC16<?php echo $stuprofile_fetch["id"]; ?></p>
        <p>FIRSTNAME :          <?php echo $stuprofile_fetch["firstname"]; ?></p>
        <p> LASTNAME :          <?php echo $stuprofile_fetch["lastname"]; ?></p>
        <p> USERNAME:           <?php echo $stuprofile_fetch["username"]; ?></p>
        <p> PASSWORD:           <?php echo $stuprofile_fetch["password"]; ?></p>
        <p> SEX :               <?php echo $stuprofile_fetch["sex"]; ?></p>
        <p> EMAIL:              <?php echo $stuprofile_fetch["email"]; ?></p>
        <p> ADDRESS :           <?php echo $stuprofile_fetch["address"]; ?></p>
        <p> MOBILE NUMBER :     <?php echo $stuprofile_fetch["mobile"]; ?></p>
        <p> INSTITUTION :       <?php echo $stuprofile_fetch["institution"]; ?></p>
        <p> CHAPTER :           <?php echo $stuprofile_fetch["chapter"]; ?></p>
        <p> MARITAL STATUS:     <?php echo $stuprofile_fetch["marital_status"]; ?></p>
        <p> LOCAL CHURCH:       <?php echo $stuprofile_fetch["local_church"]; ?></p>
        <p>BAPTISM STATUS:      <?php echo $stuprofile_fetch["baptised"]; ?></p>
        <p> MORE ABOUT BAPTISM : <?php echo $stuprofile_fetch["baptism"]; ?></p>
        <p> BANK:               <?php echo $stuprofile_fetch["bank"]; ?></p>
        <p> TELLER NUMBER:      <?php echo $stuprofile_fetch["teller_no"]; ?></p>
        <p> DATE OF PAYMENT:    <?php echo $stuprofile_fetch["payment_date"]; ?></p>




        </div></h3>
            <?php

        while  ($stuprofile_fetch=mysqli_fetch_assoc($stuprofile_query));



        ?>



        <?php

        ?>

</html>

这是我的其他代码,

第一个完成。

当我尝试加载链接时,它会在Google Chrome浏览器上显示错误505。我试过歌剧这是最新版本,它给了我下面的

         Remote server or file not found

您尝试访问当前不可用的地址http://www.omrcoc.org/stuprofile.php。请确保网址(URL)拼写正确且标点符号,然后尝试重新加载页面。 确保您的Internet连接处于活动状态,并检查依赖于同一连接的其他应用程序是否正常工作。 检查任何Internet安全软件的设置是否正确,并且不会干扰普通Web浏览。 如果您位于局域网上的防火墙后面并认为这可能导致问题,请与系统管理员联系。 尝试按键盘上的F12键并禁用代理服务器,除非您知道需要使用代理连接到Internet。重新加载页面。

当我删除内容并只在脚本中写入单词时,它会加载并在我的浏览器中显示单词,但再次插入我的php内容,它不会加载。  此外,它在我的本地主机WAMP上的相同谷歌浏览器浏览器上加载,但在我的生活服务器上,它不会,而它将加载打开所有其他脚本

有人请帮助我。

感谢

1 个答案:

答案 0 :(得分:0)

你的最后一行包含:

<?php

echo<?php echo $_SESSION ['editstuprofile'] ['firstname'];?></p> 之间没有空格。将其更改为

class BaseComponent extends React.Component {

    //Other functions

    log = (msg) => {
        console.log(`[${this.constructor.name}]`, msg);
    }

    //Other functions
}

export default BaseComponent;


class XyzComponent extends BaseComponent {

    //Other functions

    someFunction = () => {
        this.log("Some log");
    }

    //Other functions
}

export default XyzComponent;
相关问题