|
|
|
|
![]() ![]() |
Apr 2 2006, 02:25 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 258 Joined: 13-November 05 Member No.: 14,234 |
Can some one please tell me what is the purpose of the following functions , although there's a little explaination with everyline but i cant understand, can some one exaplin it bit clearly and tell me that why it is needed in config.inc.php.. what is its purpose and will it work if i dont include these files in config.inc.php
thanks QUOTE ### Url were Website has been installed, not '/' in end!
define('C_URL','http://www.test.com/Website'); ### Internal path to Website directory define('C_PATH','Z:/home/www.test.com/www/Website'); ### Site Name define('C_SNAME','MyWebsiteName'); |
|
|
|
Apr 2 2006, 02:49 PM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,994 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
what is its purpose and will it work if i dont include these files in config.inc.php thanks A 'config' file is one which contains information about the 'set-up' or the 'configuration' used for the cript or application. In the file you reference, the config information has to do with the source of the files for the application and the paths to those files which will be required for the script to operate properly and see all the data it need to and direct the user to the correct spot as they select . Without seeing the exact script you are talking about, it is difficult to know exactly what these defined constants do, but a pretty good guess would be that , yes, they will be required for the script to be able to do what you want. QUOTE ### Url were Website has been installed, not '/' in end! define('C_URL','http://www.test.com/Website'); ### Internal path to Website directory define('C_PATH','Z:/home/www.test.com/www/Website'); ### Site Name define('C_SNAME','MyWebsiteName'); They are pretty much explained by the comments included with the defines, so no need to outline what they do here. Someplace in the script, they would be used to identify paths to files on the server and the Web address for the site. They are defined outside the actual script for several reasons. First of all, so that one file can be 'required' by all scripts on the site and the data only needs to be changed in one location. Secondly, the 'defined' values can't be altered by accident inside the script whereas regular variables can be changed by methods like assignment statements (='s), but defined constants can not be, so they are safer. Thirdly, having these 'defines' available makes the script 'portable'. They can be installed anywhere in the file or folder structure of your site and not be concerned about referencing from the server root, since the path is declared in the config file. So, to answer your question, I would have the config file set-up and required_once in each of the scripts which need them to assure there are no difficulties. Also, the 'C_URL' and C_PATH' are Windows references right now. In order to upload them and use on the trap17 server, you will have to change them to Apache/Linux references. |
|
|
|
Apr 2 2006, 02:49 PM
Post
#3
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,114 Joined: 28-May 05 From: Hertfordshire, England Member No.: 7,593 ![]() |
I presume you are installing a forum or suchlike? This information is needed to allow the pages to call other scripts, save information in other files and stuff like that. For the first one enter your web address, where the script is stored. For example [colour=blue]http://www.username.trap17.com/Website[/color]. The next one is mainly used for accessing files, and you can get it from looking in cPanel. The last one looks like it should just be the 'friendly' name for your site. Try looking in the installation help files for more information.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 6th September 2008 - 05:06 PM |