English 中文(简体)
3. 在html框架中增加营地
原标题:adding php to html frame

我在把营地添加到包括框架在内的html方面有问题。 这里是我的法典;

    <?php
    session_start();
if (($_SESSION[ accesslevel ] != "normal") ||($_SESSION[ accesslevel ] != "admin" )) {
?>
    <meta http-equiv="refresh" content="0; url=./login.html">
    <?php}else {?>

<!DOCTYPE HTML>
<html lang="en">
<head>
<title>METU 3D Panaromic View</title>
<meta name="description" content="File Upload widget with multiple file selection, drag&amp;drop support, progress bar and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.">
<meta name="viewport" content="width=device-width">
<!-- Bootstrap CSS Toolkit styles -->
<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap.min.css">
<!-- Generic page styles -->
<link rel="stylesheet" href="upload/css/style.css">
<!-- Bootstrap styles for responsive website layout, supporting different screen sizes -->
<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-responsive.min.css">
<!-- Bootstrap CSS fixes for IE6 -->
<!--[if lt IE 7]><link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-ie6.min.css"><![endif]-->
<!-- Bootstrap Image Gallery styles -->
<link rel="stylesheet" href="http://blueimp.github.com/Bootstrap-Image-Gallery/css/bootstrap-image-gallery.min.css">
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
<link rel="stylesheet" href="upload/css/jquery.fileupload-ui.css">
<!-- Shim to make HTML5 elements usable in older Internet Explorer versions -->
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <frameset rows="40px,94%" BORDER=2 >
        <frame src="./normal_menu.html" noresize="noresize" scrolling="no" name="menu"/>
        <frameset cols="25%,75%" BORDER=2>
           <frame src="./map3.php?type=1" name="MAP" />
           <frame src="./view.html?fileName=findik.den.jpg" name="VIEW"/>
        </frameset>
    </frameset>
</head>
<body>
</body>
</html>
<?php}?>

它看不出是否在实验室,因此总是转向标识。 如何在不提供框架的情况下处理。

感谢。

问题回答

http://www.php.net/manual/en/Function.header.php“rel=“nofollow”header http://www.un.org/Depts/DGACM/index_french.htm

header( Location:login.html );

你们目前这样做的方式是,你冒着向客户发送内容的风险,即他们不应接触,而只是转头。

除此以外,我认为你的实际问题是“风海逻辑”,似乎你应当使用一种ool,而不是一种OR:

if (($_SESSION[ accesslevel ] != "normal") && ($_SESSION[ accesslevel ] != "admin" )) {

你在这里的条件是:

if (($_SESSION[ accesslevel ] != "normal") ||($_SESSION[ accesslevel ] != "admin" )) {

这两项条件中的一项是:<>途径是真实的——_SESSION[接入水平将永远不等同于“正常”,也不等于“行政”。 (可能与两者平等)。

也许意味着:

if (!($_SESSION[ accesslevel ] == "normal" || $_SESSION[ accesslevel ] != "admin")) {

I tried your code. Array $_SESSION is empty! According with php manual (session_start section), "The read callback will retrieve any existing session data (stored in a special serialized format) and will be unserialized and used to automatically populate the $_SESSION superglobal when the read callback returns the saved session data back to PHP session handling." So, if you don t have any previous session going on, it seems that array $_SESSION is never populated and any test you make on it will not give any usefull result.

<?php
session_start();
if (isset($_SESSION[ accesslevel ]) && !(($_SESSION[ accesslevel ] == "normal") || ($_SESSION[ accesslevel ] == "admin" ))) {
?>




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签