Current location: Hot Scripts Forums » Programming Languages » PHP » Looking for a push in the right direction


Looking for a push in the right direction

Reply
  #1 (permalink)  
Old 08-03-06, 05:12 PM
Anastas Anastas is offline
Wannabe Coder
 
Join Date: Mar 2005
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
Looking for a push in the right direction

I'm trying to interface PHP with a database system. I need to be able to send commands to the command prompt using PHP. I have a computer on Windows 98 set up as a server with Apache and PHP installed, I would appreciate any hints as to how to send a command to the command prompt using PHP.

EDIT: I meant that I am looking for how to execute actual command prompt queries from PHP, not PHP queries - the best answer, I suppose, would be to the question of how can I just use PHP to send the command prompt the "dir" command?

Thanks in advance.

Last edited by Anastas; 08-03-06 at 05:17 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-03-06, 05:56 PM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Anastas
I'm trying to interface PHP with a database system. I need to be able to send commands to the command prompt using PHP. I have a computer on Windows 98 set up as a server with Apache and PHP installed, I would appreciate any hints as to how to send a command to the command prompt using PHP.

EDIT: I meant that I am looking for how to execute actual command prompt queries from PHP, not PHP queries - the best answer, I suppose, would be to the question of how can I just use PHP to send the command prompt the "dir" command?

Thanks in advance.
Maybe make the command go to a text file in a spacific directory then have php execute a small batch file or something that would execute what was in the text file?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-03-06, 06:25 PM
duesi's Avatar
duesi duesi is offline
Wannabe Coder
 
Join Date: Jun 2006
Posts: 225
Thanks: 0
Thanked 0 Times in 0 Posts
There is a function called system() in PHP which does exactly this:

http://www.php.net/manual/en/function.system.php

A small remark: if you use the word "query", this normally means a database command. "dir" is a shell command.

Happy coding!
__________________
Duesi

"One of the great skills in using any language is knowing what not to use, what not to say" (Ron Jeffries)

http://www.swissbytes.de
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I Need Direction!!! gigantor Script Requests 0 02-05-06 09:34 AM
Needing a push in the correct Direction... tc3driver PHP 3 07-28-05 03:50 AM
Need Direction John_Vyhnanek New Members & Introductions 0 01-24-05 12:58 PM
point me in the right direction jbkons PHP 1 05-28-04 01:48 PM
Hi Can you point me in the right direction? cerby New Members & Introductions 2 06-16-03 03:13 PM


All times are GMT -5. The time now is 06:55 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.