Hello. I am working using XAMPP in my pc. In XAMPP, if you want to upload a file u need to show a absolute path for the upload directory, for example "htdocs/sitename/foldername/". Problem is, everytime i copy the work in WAMP server and also the free host i use, i need to change the path in a relative path to work. So, i was wondering if i can configure the XAMPP somehow(php.ini or somewhere else, for example) so that it can work if i show the upload directory as relative path. thanks in advance.
I used relative on both and it worked fine. Heres a snippett to show you what I did: I wanted the ability to change the name of the upload folder on a regular basis for security reasons which is why $target is defined in config. You could define it at the top of your script if you like.