Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Shell Command Problem!!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-08, 09:50
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 30
Question Shell Command Problem!!!

i want to add shell command in php page that it will automatically notepad
like visual basic shell("notedpad.exe")

i want to open notepad using php page
and i also want to open notepad in .vbs file can anybody please tell me the coding!
Reply With Quote
  #2 (permalink)  
Old 11-29-08, 22:51
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 706
If what you are trying to do is embed notepad into your html, forget it, it can't be done.

If you want PHP to call notepad, check out PHP's exec() function. I don't understand why you would want to call notepad because you won't be able to save anything back into PHP or even a database after notepad is opened. What are you trying to do?
Reply With Quote
  #3 (permalink)  
Old 11-30-08, 04:08
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 30
just i want to know for learning php skills to exec() command can u tell me the whole command how can i exec it
Reply With Quote
  #4 (permalink)  
Old 11-30-08, 04:49
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 5,444
if you are thinking of learnign PHP then consider getting one of the free editors such as Chamisoft's HTML Kit. with the PHPO extenstions it will help you generate PHP code
__________________
Warning
May! contain traces of NUT. people with NUT allergies should not pay attention to any of the above
Reply With Quote
  #5 (permalink)  
Old 11-30-08, 05:47
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 706
If you wanted to run notepad you could use the following PHP code.

PHP Code:
<?php exec("C:\pathto\notepad.exe"); ?>

Healdem has also given you great advice. Also, you may want to check out php's site http://php.net. Excellent resource.
Reply With Quote
  #6 (permalink)  
Old 11-30-08, 14:11
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 30
Thumbs up

Quote:
Originally Posted by fjm1967
If you wanted to run notepad you could use the following PHP code.

PHP Code:
<?php exec("C:\pathto\notepad.exe"); ?>

Healdem has also given you great advice. Also, you may want to check out php's site http://php.net. Excellent resource.
thanks to give me such a nice example and such a nice coding thanks alot
Reply With Quote
  #7 (permalink)  
Old 11-30-08, 15:14
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 5,444
I'd also consider w3schoools as an excellent resource
__________________
Warning
May! contain traces of NUT. people with NUT allergies should not pay attention to any of the above
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On