How I can run PHP script without PHP Server like PHP Triad, Xampp, etc.
I think it is simpler and more flexible.
Thanks for sharing.
I think it is simpler and more flexible.
Thanks for sharing.
| Code: |
| c:\php\php.exe "path where you have your script.php" |
| Code: |
| c:\php\php.exe "your_script.php" > output.html |
| Code: |
| php "your_script.php" |
| kv wrote: |
| Actually, if you use c:\php\php.exe, you will get html output, and this is more optimized towards handling http requests. There is a client version of the interpreter which is bundled with php. This outputs text to console. It will be available at C:\php\cli\php.exe (assuming you installed php under c:\php). |
| Quote: |
| How I can run PHP script without PHP Server like PHP Triad, Xampp, etc. |
| Quote: |
| Actually, if you use c:\php\php.exe, you will get html output |
| badea wrote: |
| Thank u but can we run python scripts with out python server ??? |
| simplyw00x wrote: | ||
No, you won't. You'll get html output if you output <html>. Why not actually check things before you say them? |
| Code: |
| <?
echo "test"; ?> |
| Code: |
|
test |
| Code: |
|
X-Powered-By: PHP/4.4.2 Content-type: text/html test |
| Quote: |
| where as the web version outputs |
| Quote: |
| Thank u but can we run python scripts with out python server ??? |
| ninjakannon wrote: |
| Sorry to barge in like this, but I have a relevant question.
As you can run php in such a way, is there any way to do the same with MySQL, so that you can also simulate, or actually perform, database modifications without setting your computer up as a server? |
| JayBee wrote: |
| You can't access mysql database without server. MySQL and other DBMSs are designed to work as client-server. One server is still running and manage all accesses to the database files. |
| JayBee wrote: |
| If you want SQL database without server try SQLite http://www.sqlite.org It is small library and it doesn't need any server. |
| ninjakannon wrote: |
| Yeah, I didn't think it was possible. But I only asked because I didn't think that you could run php files without them being on a server where php is installed, and you can. So I had doubts. |
| ninjakannon wrote: | ||
Thanks once again, JayBee. |
| JayBee wrote: |
| Now it's really off topic |
| Quote: |
| What are the limitations of doing this |
| simplyw00x wrote: | ||
Limitations of sqlite are that it's slower than mySQl, and afaik less feature-complete. |