Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    PHP OO Woes!!!!!!

    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 Code:
    <?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>
    I'm gonna find a way to download the internet if its the last thing I do...
    Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished

  • #2
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Can paste the output of it, when the code is there?

  • #3
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Zilch, nada, nothing....
    Have a look at the source 2:

    Code:
    <!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>
    I'm gonna find a way to download the internet if its the last thing I do...
    Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished

  • #4
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    did you try calling your method?
    and there is no need to escape all the double quotes, that is ugly
    PHP Code:
    class Skin {

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

    }

    Skin::getScripts();

  • #5
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    PHP version? It runs fine on PHP5.0.4. You should have PHP5 for it.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #6
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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
    I'm gonna find a way to download the internet if its the last thing I do...
    Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •