Rabu, 09 Oktober 2013

PHP Indonesia - Facebook: saya punya .bat file yg akan dieksekusi via php (C...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Refresh your vocabulary.

Learn a new word everyday by subscribing to Word of the Day. A great tool if you're studying for the GRE, GMAT or LSAT, or simply want to enhance your lexicon.
From our sponsors
saya punya .bat file yg akan dieksekusi via php (C...
Oct 9th 2013, 09:30, by Ridwan Aji Bari

Ridwan Aji Bari 9:30am Oct 9
saya punya .bat file yg akan dieksekusi via php (CodeIgniter). kenapa gak mau ke eksekusi ya? cmd muncul dengan perintahnya. tapi hang, sementara klo saya jalankan via php (no CodeIgniter) itu bisa. mohon pencerahannya master2.
...... GENERATE .bat
$filename = 'restore.bat';
$content_file = "sqlcmd.exe -E -S $serverName -Q \"use master\"sqlcmd.exe -E -S $serverName -Q \"restore database [".$this->db->database."] from disk = 'C:/xampp/htdocs/".$this->config->item('dir_root')."/".$val['file_name']."' WITH FILE=1,REPLACE,RECOVERY,NOUNLOAD, REPLACE, STATS = 10\" \n";
$content_file2 = 'exit';
$handle = fopen('asset/files/restore/'.$filename, "w");
$handle_ = fopen('asset/files/restore/'.$filename, "a+");
fwrite($handle, $content_file);
fwrite($handle_, $content_file2);
fclose($handle);
fclose($handle_);
$this->action_restore2();

...... action_restore2() EKSEKUSI .bat
$str = exec('START c:\WINDOWS\system32\cmd.exe /c START C:/xampp/htdocs/'.$this->config->item('dir_root').'/asset/files/restore/restore.bat');

Rully Ramanda 9:51am Oct 9
file bat nya koq isinya code php...

Ridwan Aji Bari 9:52am Oct 9
isi .bat nya itu query SQL SERVER untuk restore. klo script diatas ane bikin pake php murni (bukan di lingkungan CI) lancar jaya.

Rully Ramanda 9:53am Oct 9
oh itu diatas bukan file bat nya ya...


You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar