...

View Full Version : PHP OO Woes!!!!!!



jaywhy13
02-16-2006, 04:55 PM
Can someone tell me why this file won't even show the title in the bar?
When I delete the contents of the Skin class the title shows in the titlebar, but not when there's anything in there

<?php
/**
* Skin file, used to make different components... final class
*
* @author labtech
* @package skins
*/

class Skin
{



public static function getScripts()
{
echo "<script src=\"skins\\default\\defaultSkinScripts.js\" language=\"Javascript\"></script>\n\n";
}


}


?>


<html>
<head>
<title>Skin File</title>
</head>

</html>

gsnedders
02-16-2006, 04:58 PM
Can paste the output of it, when the code is there?

jaywhy13
02-16-2006, 05:19 PM
Zilch, nada, nothing....
Have a look at the source 2:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>

fci
02-16-2006, 05:49 PM
did you try calling your method?
and there is no need to escape all the double quotes, that is ugly

class Skin {

public static function getScripts() {
?><script src="skins/default/defaultSkinScripts.js" language="Javascript"></script><?php
}

}

Skin::getScripts();

marek_mar
02-16-2006, 06:17 PM
PHP version? It runs fine on PHP5.0.4. You should have PHP5 for it.

jaywhy13
02-17-2006, 04:13 PM
Thanks... The version of PHP am using is not the correct one, the one at school that is... I didn't check the version that came with Apache2Triad. That's the one am using at school



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum