Root directory for uploading files
"Rikki Prince" <[email protected]> Wed, 16 Mar 2011 18:36:14 -0000
| Newsgroups | gmane.comp.web.curl.php |
|---|---|
| Message-ID | <EMEW3|6ca78ff95ab1e6c314a47d6dbd1fa4ebn2FIaN06rfp07r|ecs.soton.ac.uk|[email protected]> |
Hi everyone, I have some PHP code which uploads a file to a REST interface using libcurl (@ before the file name in CURLOPT_POSTFIELDS). I was using a relative path to point to the file, which worked fine on the Mac I was developing on. However, when I deployed it to a Windows machine it didn't work. A bit of debugging later, I found that rather than relative to the directory the PHP script is in, or even the document root, libcurl was looking for the file in the server root (C:\apache in my case). Of course, I was being stupid, it tells me to use the full path here: http://php.net/manual/en/function.curl-setopt.php However, I was wondering if there is a reason for this inconsistency between libcurl on Mac and Windows? Have I just messed up my server config or is this a known bug? Cheers, Rikki -- = Rikki Prince = _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php