Executing PHP from command line?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
L3go1as
Forum Newbie
Posts: 2
Joined: Sun Sep 15, 2002 12:35 am

Executing PHP from command line?

Post by L3go1as »

Okay, Im under the impression that when you type "php file.php" that it executes the script...Now this works but when I stick a mysql query in there, it works when I visit the page via a browser, but when I execute it via prompt, it won't do it?

Any ideas?
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Is the MySQL server running when you try to execute the PHP file?
L3go1as
Forum Newbie
Posts: 2
Joined: Sun Sep 15, 2002 12:35 am

Post by L3go1as »

Well obviously because it works when I use my browser.
Post Reply