mysql - PHP Script runs fine in browser but not through Command Line -
i'm using xampp on windows 7. have following simple script
<?php require("classes/autoloader-class.php"); $query=new login(); $query->query("insert poupdate(`po`, `fval`, `nr`, `fsa`, `act`, `doctype`, `usr`) values ('po','fval','nr','fsa','act','doctype','user')"); ?>
script runs fine in browser , records inserted in database when try through following php command no records inserted
d:\xampp\php\php.exe -c -f d:\xampp\htdocs\mytest\test.php
when echo output text in command line; think there problem mysql no error.
please note -c
being used load libraries php.ini
how can troubleshoot ? in advance
[following command helped me in executing command]
d:\xampp\htdocs\mytest>d:\xampp\php\php.exe -c -f test.php
just thought. directory working path when execute via command line? is: "standing" when execute command?
try moving mytest
folder first.
> d: > cd d:\xampp\htdocs\mytest
Comments
Post a Comment