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

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

* 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";



<title>Skin File</title>


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

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">
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>

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



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

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