I have a php script who acces开发者_如何转开发s a MySQL database, all running in my server. I know how to compile php scripts in order to generate a .exe program, but this is the first time I got a php script that uses a MySQL, and I dont know how to compile the entire think. I dont want the .exe to use a remote mysql because I need to use it offline.
Thanks for any help.
If you use PDO you might just switch to SQLite on the fly.
No, it is not possible to embed a MySQL server in a compiled PHP script. The best you will be able to do is either replace MySQL with something like SQLite (not sure how feasible that will be) or build an installer that ships MySQL and the appropriate database tables (much more feasible).
精彩评论