wrighteq Posted November 7, 2006 Share Posted November 7, 2006 My site has a main page called index.php that is based on a 3rd party user login script. My site is hosted on a linux server, and I wanted to know where exactly is the best place to upload the actual php script folder. Should it be in the usr/var/www ? or usr/src ? If I put it in usr/src how do I specify the form submit button to go to that directory and access the needed php file?Thanks Link to comment https://forums.phpfreaks.com/topic/26490-simple-question-about-uploading/ Share on other sites More sharing options...
blear Posted November 7, 2006 Share Posted November 7, 2006 The directory where your scripts go is determined by the settings on the server. Find the directory the index.php file is in (make sure its the RIGHT index.php, there will be many all over your server) and that is the base directory. EG, if you use "include 'foo.php';" the foo.php in the same directory as THAT index.php will be loaded.Alternately, you can use the info generated by phpinfo(); function to determine the base directory. It will be listed as _SERVER["DOCUMENT_ROOT"] if used on apache web server.Finally, if you understand linux, have access to command line, and have permissions set right you can set up a symbolic link to anywhere you feel is a good place to put your scripts, as long as you put an appropriate link to there in your document_root directory. Link to comment https://forums.phpfreaks.com/topic/26490-simple-question-about-uploading/#findComment-121205 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.