PHP and javascript
| From: | Andres Gonzalez | Date: | Fri, 15 Jan 2010 19:07:39 +0000 |
| Subject: | PHP and javascript | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-301139@lists.php.net to get a copy of this message | ||
How do I call PHP code that will run server side, from javascript code that is running client side?
I have a lot of PHP server side code written and working within CodeIgniter. Now, my project
has changed and (for reasons unimportant to this discussion) we are now NOT going to
use apache and CodeIgniter, but instead, we are going to have to use an http server that does
not support PHP internally. But I want to reuse my original PHP code. So I am thinking that I
can execute the PHP code via a command line interface using the PHP cli interface instead of
the PHP cgi interface. But, I will have to initiate this serversid call via javascript code running
on the client.
I know...kind of convoluted. But how would one do this if necessary?
-Andres