Gå til innhold

Internettsida mi er plutselig blank


Anbefalte innlegg

Skrevet (endret)

sida mi (www.dahwan.info) kommer plutselig opp helt blank, noe jeg IKKE forstår. Jeg jobbet med sida mi, så plutselig en dag når jeg trykker på "preview", kommer sida mi opp helt blank.

 

index.php

<?php include("header.php") ?>

<div class="wrap">
	<div class="col">
		<h3>Monday 4th - March 2008<span class="red"><br>Site creation!</span></h3>
		<p>This is the day on which Dahwan.info was created! And allready pasting code to my page is a pain in the ***, so my current project is a program that adds html tags around the sourcecode. So all i have to do is run my file <br />(ex. MyProg.cs) through my program, and all the html tags for syntax highlighting and linebreaks will be added.
		The program will, as all other programs, be downloadable with source codes.
		</p>
	</div>
</div>

<?php include("footer.html") ?>

 

header.php

<?php 
include("phpFunctions.php")
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>Dahwan.info</title>

<meta name="description" content="Dahwan.info - The home page of programmer Tomas Sandven. Open source programs and tutorials." />

<meta name="keywords" content="dahwan.info, dahwan, programming, cs, c#, c, sharp, ++, c++, tutorials, open, source, program, programs" />

<link href="css/main.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div id="header">

<h1><a href="#">Dahwan</a></h1>

<ul id="menu">

	<li><a href="index.php">Home</a></li>

	<li><a href="tutorials.php">Tutorials</a></li>

	<li><a href="aboutme.php">About me</a></li>

	<li><a href="contact.php">Contact</a></li>

</ul>

</div>



<div id="teaser">

<div class="wrap">

	<div id="image"></div>

	<div class="box">

		<h2>Welcome to <em>Dahwan programs</em></h2>

			<p>

				Home page of programmer Tomas Sandven.<br />

				I have about a year of experience programming C#, and a couple of months programming C++. I use C# to write windows programs, and I'm learning to program OpenGL and Direct3D using C++.<br/>

				You can contact me by clicking the link at the bottom of the page. <br />

				Cheers!

			</p>

		</div>

</div>

</div>



<div id="bar">

<div class="wrap">

	<span class="step"><a>1</a> Idea</span>

	<span class="step"><a>2</a> Design</span>

	<span class="step"><a>3</a> Code</span>

</div>

</div>

 

footer.html

<div id="footer">
	<p>© Copyright 2008 <a title="Send an e-mail to Tomas Sandven" href="mailto:[email protected]">Tomas Sandven</a> · All Rights Reserved</p>
</div>
</body>
</html>

 

phpFunctions

<?php
function GetURL() {
	$pageURL = 'http';

	if ($_SERVER["HTTPS"] == "on") {
		$pageURL .= "s";
	}

	$pageURL .= "://";

	$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];

	else {
		  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
	}

	return $pageURL;
}
?>

 

Hvorfor kommer sida mi opp helt blank?? O.o

Endret av dahwan
Videoannonse
Annonse
Skrevet

Post 1 oppdatert

 

(Men hva har phpFunctions.php med saken å gjøre? Tviler på at det er den som gjør hele sida mi usynlig)

Skrevet (endret)

En helt blank side er ofte feil i php koden, så er error_reporting skrudd av slik du ikke får se feilmeldingen. Er nok derfor de spør etter phpFunctions.php slik de kan se etter feil i koden der.

 

Edit: siden din er ikke helt blank, den inneholder litt html men ikke noe innhold.

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
 <title>www.dahwan.info </title>
 <META name="description" content="Tomas Sandven programming blog"><META name="keywords" content="tomas sandven c sharp csharp c# programming free programs source codes">
</head>
<frameset rows="100%,*" border="0">
 <frame src="http://dahwan.110mb.com" frameborder="0" />
 <frame frameborder="0" noresize />
</frameset>

<!-- pageok -->
<!-- 02 -->
<!-- 7.0-->
</html>

Endret av trrunde
Skrevet

DUDE! Les post #1

Der er kildekoden, og DEN er ikke blank! Det har mer enn nok innhold.

 

Så hvorfor er sida mi blank?

Gjest Slettet+142
Skrevet

PHP-Koden din inneholder feil. du har plassert en if(){} og else for den if-en med kode imellom hverandre, som ikke er tillatt.

 

Prøv denne:

<?php
function GetURL() {
	if ($_SERVER["HTTPS"] == "on")
	  return "https://" . $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
	else
	  return "http://" . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
?>

Skrevet
DUDE! Les post #1

Der er kildekoden, og DEN er ikke blank! Det har mer enn nok innhold.

 

Så hvorfor er sida mi blank?

 

Dude les teksten min! Du har feil en plass i koden din, skru på error_reporting!

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...