Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 7 of 7

Thread: File Path

  1. #1
    Join Date
    Jan 2009
    Posts
    7
    Tokens
    0

    Default File Path

    Apparently on my webhost Php Include isnt the best way for me add radio stats to my site

    the web host said i need to do a Full File Path

    How do i do this?

  2. #2
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    just include('path/to/file/radiostats.php'); in your php file will do fine. don't know what your webhost is on about.
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  3. #3

    Default

    When they said full path they probably meant real path. You can get that by the following.
    PHP Code:
    $path realpath('./');
    include 
    $path.DIRECTORY_SEPARATOR.'folder'.DIRECTORY_SEPARATOR.'file.php'
    You don't have to use the constant "DIRECTORY_SEPARATOR" if you know what operating system you're on but it's good if it's going to transits from Windows to Linux. For example my include path would be like C:\XAMPP\htdocs\folder\file.php

  4. #4
    Join Date
    Jan 2009
    Posts
    7
    Tokens
    0

    Default

    Tech Hosts said this to me when i asked how to do radio stats

    "You'd need to include them through the full path of the file, for example:
    /home/yourcpanelusername/public_html/stats/radio_stats.php


    I think My file path is
    /home/icehabb1/public_html/radio_stats.php

    But is there any other code that goes around it?
    Ive used the php include it doesnt seem to work..
    well nothing comes up just blank
    the radio stats on my file are working when i view it
    just getting them on my actual site is being a pain

  5. #5
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Iszak View Post
    When they said full path they probably meant real path. You can get that by the following.
    PHP Code:
    $path realpath('./');
    include 
    $path.DIRECTORY_SEPARATOR.'folder'.DIRECTORY_SEPARATOR.'file.php'
    You don't have to use the constant "DIRECTORY_SEPARATOR" if you know what operating system you're on but it's good if it's going to transits from Windows to Linux. For example my include path would be like C:\XAMPP\htdocs\folder\file.php
    Just use / it works on Windows as well.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  6. #6

    Default

    Better to get in a good habit now, you don't want to go using / on window system commands. But I guess if you really want to make it look 'pretty' you can use / on your includes.

  7. #7
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    / on system commands work just fine. So it's not really a 'bad' habit..

Posting Permissions

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