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?
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?
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.
When they said full path they probably meant real path. You can get that by the following.
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.phpPHP Code:$path = realpath('./');
include $path.DIRECTORY_SEPARATOR.'folder'.DIRECTORY_SEPARATOR.'file.php';
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![]()
Just use / it works on Windows as well.When they said full path they probably meant real path. You can get that by the following.
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.phpPHP Code:$path = realpath('./');
include $path.DIRECTORY_SEPARATOR.'folder'.DIRECTORY_SEPARATOR.'file.php';
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
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.
/ on system commands work just fine. So it's not really a 'bad' habit..
Want to hide these adverts? Register an account for free!