Username Password

Lost Password
View Thread
Explore Your Brain » Pemrograman » PHP
[help] upload file to different server
Username
Password
Register FAQ Members List Today's Posts Search

Print Thread

29-01-2013 10:13 PM [help] upload file to different server
User Avatar

letsmove
Murid Akademi II


Posts: 39
Joined: 13.07.09
brader.. mau tanya donk.
jadi gini ceritanya, saya mau upload file dengan source code berada misalkan di 192.168.6.4
nah tujuan upload saya pengen ke ip lain misalkan 192.168.6.5/exceldir/. itu bagaimana caranya ya supaya saya bisa upload ke directory exceldir tersebut.. saya menggunakan Codeigniter. dan ini penggalan dari function upload file saya.

Download source  Code

function upload_files()
{

$docPath = '"\\192.168.6.5\exceldir\"';
$status = "";
$msg = "";
$file_element_name = 'myFile';
$config['upload_path'] = $docPath;
$config['allowed_types']= 'xls';
$config['max_size'] = 1024 * 8;
$this->load->library('upload',$config);
$this->upload->initialize($config);





nah ketika dijalankan saya mendapat error message : "The upload path does not appear to be valid"

mohon bantuannya.. terima kasih
i dont wanna move slow
 
Offline
30-01-2013 07:43 AM RE: [help] upload file to different server | Edited by EVA-00 30-01-2013 07:43 AM
User Avatar

EVA-00
HackAge


Posts: 2770
Joined: 21.05.08
Location: Wallahu a'lam
Age: 38
di CI ada library ftp class bro, yg fungsinya yaitu "CodeIgniter's FTP Class permits files to be transfered to a remote server. Remote files can also be moved, renamed, and deleted. The FTP class also includes a "mirroring" function that permits an entire local directory to be recreated remotely via FTP."

selengkapnya silahkan cek di sini

Semoga membantu, Wink
Nabi Muhammad SAW bersabda :ā€¯ Barangsiapa Yang Mengamalkan Ilmu Yang Ia Ketahui Maka Allah Akan Memberikan Kepadanya Ilmu Yang Belum Ia Ketahuiā€¯ (HR. Imam Ahmad).

..::shn6 u!vJq Jnoh 3Joldx3 d33>I::..
 
Offline
30-01-2013 08:58 AM RE: [help] upload file to different server
User Avatar

letsmove
Murid Akademi II


Posts: 39
Joined: 13.07.09
kalo ga pake ftp class bisa ga bro. soalnya ip 192.168.6.5/exceldir/ nya hasil dari windows share directory dan full access. jadi bisa ngecreate file langsung. mohon petunjuknya.... Help
i dont wanna move slow
 
Offline
30-01-2013 12:50 PM RE: [help] upload file to different server
User Avatar

EVA-00
HackAge


Posts: 2770
Joined: 21.05.08
Location: Wallahu a'lam
Age: 38
CI belum bisa cross domain / ip address, salah satu cara buat ngakalinnya ya pake FTP class.

or coba akalin bgini, 192.168.6.5/exceldir/ di mapping drive ke server 192.168.6.4 nah dari situ kan bisa bikin full path, btw OS server 192.168.6.4 apa?
Nabi Muhammad SAW bersabda :ā€¯ Barangsiapa Yang Mengamalkan Ilmu Yang Ia Ketahui Maka Allah Akan Memberikan Kepadanya Ilmu Yang Belum Ia Ketahuiā€¯ (HR. Imam Ahmad).

..::shn6 u!vJq Jnoh 3Joldx3 d33>I::..
 
Offline
30-01-2013 01:12 PM RE: [help] upload file to different server
User Avatar

letsmove
Murid Akademi II


Posts: 39
Joined: 13.07.09
nah. ini sebenernya udah di mapping. jadi 192.168.6.5\exceldir\ berada di drive z:\ dan bener bener full access. bisa ngecreate file dari exporernya langsung..

os pake windows server..


Help
i dont wanna move slow
 
Offline
30-01-2013 02:13 PM RE: [help] upload file to different server
User Avatar

EVA-00
HackAge


Posts: 2770
Joined: 21.05.08
Location: Wallahu a'lam
Age: 38
lho, kalo udah bisa di map drive gampang bro, tinggal edit httpd.conf bawaan apachenya, buka file httpd.conf trus cari baris

"<IfModule alias_module>"

dibawahnya tambahin script :

Alias /localhost/situslu/exceldir "z:/ exceldir"

lanjut cari baris kode ini

#
# "C:/xampp/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/xampp/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>


tepat dibawahnya sisipin kode ini

<Directory "Z:/exceldir">
AllowOverride All
Order allow,deny
allow from all
</Directory>


Restart apache, coba akses http://192.168.6.4/situslu/exceldir bisa kebuka ga???

kalo bisa, nanti kode CI di bagian pathnya jadi : $docPath = '"\\localhost\situslu\exceldir\"

Selamat Mencoba, Wink


Nabi Muhammad SAW bersabda :ā€¯ Barangsiapa Yang Mengamalkan Ilmu Yang Ia Ketahui Maka Allah Akan Memberikan Kepadanya Ilmu Yang Belum Ia Ketahuiā€¯ (HR. Imam Ahmad).

..::shn6 u!vJq Jnoh 3Joldx3 d33>I::..
 
  x 1
Offline
Jump to Forum:
Forum powered by fusionBoard
Share this Thread
URL:
BBcode:
HTML:
Similar Threads
Thread Forum Replies Last Post
Php and MySQL jadi file installer(Exe) PHP 2 18-07-2014 14:15
ITOP aplikasi server gratis buat dep IT Open Source OS 1 03-04-2014 18:03
ASK jadi admin server linux Networking 5 08-03-2013 14:33
CBT Nuggets - Designing and Implementing a Server Infrastructure Video 1 14-12-2012 10:40
Read This Before You Start File Sharing Pengumuman 1 08-12-2012 02:50
Copyright © 2007-2016