Access local folder from webserver php file |
[eluser]JasmineFlower[/eluser]
Hi I need to access localhost directory files from webserver and store that files in to webserver folder.My php files are stored in webserver. it is possible? pls anyone know this tell me
[eluser]toopay[/eluser]
Did you mean access "local-computer's file" from "remote"(such as shared host, dedicated server, etc) server via internet, or accessing file via webserver(such as : Apache)?
[eluser]JasmineFlower[/eluser]
accessing localhost file via webserver it is possible? I have static localhost system.
[eluser]JasmineFlower[/eluser]
If there is any installation need to use cURL
[eluser]JasmineFlower[/eluser]
I enabled extension=php_curl.dll in php.ini file. Code: $dir = "../localhost folder name/"; it display below error Code: Warning: curl_setopt_array(): supplied argument is not a valid File-Handle resource in C:\xampp\htdocs\folder name\file.php on line 35 Is this correct code for upload file from localhost to webserver ?
[eluser]JasmineFlower[/eluser]
Code: $dir = "../localhost foldername/"; it works only for text file but my file type is .dxf file (drawing file).cURL display the error Code: Warning: curl_setopt(): supplied argument is not a valid File-Handle resource
[eluser]toopay[/eluser]
Have you try to use file_get_contents and file_put_contents(http://www.php.net/manual/en/function.fi...ntents.php)? cURL is to fancy for that trivial task.
[eluser]JasmineFlower[/eluser]
thank u thank u it works toopay thank u so much
[eluser]toopay[/eluser]
You're so welcome and no problem at all! Just remember, if it (the task) was simple, then keep it (the method) simple!;-) |
Welcome Guest, Not a member yet? Register Sign In |