hey I want to run php on command prompt with xampp server. I made 2 environmental variables C:\xampp\php and C:\xampp\mysql\bin. how to execute the php code now?
1 Answer
Run command from console
c:\xampp\<path to php>\php.exe <path_to_your_php_project>\your_script.php
8 Comments
scrowler
Even better - add the path to PHP to your system path
Thakur Akshay
yes. i can execute it now. but i have one more php file in which i have html code and php tag also. but when i execute that php file then i am getting html code as output in cmd. How can i solve this error?
Nick
But why you trying to call script from console which generate HTML?
Thakur Akshay
actually i have file upload code in html in which i am uploading photos and storing it in a folder on server.
Nick
Why you trying to do it from console?
|