PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
fairyprincess18
Forum Newbie
Posts: 21 Joined: Sun Dec 07, 2008 8:54 pm
Post
by fairyprincess18 » Tue Apr 07, 2009 2:43 pm
whenever i try to include this small php script before my html DTD, it breaks some of the javascript functionality on my page.
the php script is:
Code: Select all
<?php
require_once('d:\pieces\wnusers\wnuser.class.php');
$user = new wnuser();
if (!$user->valid) { // check whether user/pass combo worked
header('Location: index.php?err=bad_login');
exit();
}
?>
my guess is that including this doesnt work due to conflict with my html DTD definition as follows:
Code: Select all
<!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">
anyone know why?
akuji36
Forum Contributor
Posts: 190 Joined: Tue Oct 14, 2008 9:53 am
Location: Hartford, Connecticut
Post
by akuji36 » Sat Jun 06, 2009 10:12 am
try
the transitional doctype
mikemike
Forum Contributor
Posts: 355 Joined: Sun May 24, 2009 5:37 pm
Location: Chester, UK
Post
by mikemike » Sat Jun 06, 2009 10:15 am
Remove the whitespace, and shouldn't it be:
Code: Select all
require_once('d:\\pieces\\wnusers\\wnuser.class.php');
Or am I living in the dark ages? (I've not used a Windows machine for years)