怎样编译PHP文件?

怎样编译PHP文件?,第1张

不需要编译的,把PHP文件拷贝到你的网页目录里面,在地址栏输入:http://127.0.0.1/*.php就可以了

补充:

大家说得非常明白了,你自己写的PHP程序,鼠标双击就可以运行,不需要编译。如果双击的时候问你用什么打开,你就选择你自己安装的PHP.EXE文件。

多数情况PHP写的程序是在网页上用的,如果你也是写的网页程序,那就放在网页文件夹下,用浏览器使用http://127.0.0.1/***.php来打开运行。

反正无需编译,直接解释运行。

1.在php的原码安装包里,进入到etc/pdo_mysql里。假设你的php是安装在/usr/local/php里的。执行/usr/local/php/bin/phpize

2. 进行编译。./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql (假设你的mysql是安装在/usr/local/mysql)

3.编译安装。make,make install。

4.到了第3步的时候。在/usr/local/php/lib/php/extensions里就会多了个no-debug-non-zts-20050922文件夹,它里面就生成了一个pdo_mysql.so

5.修改php.ini,加入扩展语句extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20050922/pdo_mysql.so"

6.重启apache。OK扩展完成

7.安装pdo的方法与pdo_mysql的方法一样.但是要注意在这个安装过程中如果系统没有aclocal命令,那么请先安装这个命令,这个命令在autoconf包里。

Makefile Targets  

  

Below are some empirical definitions of what each of the "standard" Makefile targets (clean, realclean, distclean and uninstall) should do:  

  

    make clean - removes core, *.o, *~, a.out, *.orig, *.rej plus any other files created by the building of the program(s) (except of course the executable(s))  

    make realclean - does make clean plus it removes the executables from the build directory  

    make distclean - does make realclean plus removes Makefile, config.* files, C source files produced by configure and so on. Basically, after distclean only the originally distributed files should be left behind  

    make uninstall - delete all installed files created by the install target. That's all, and doesn't depend on any of the other targets, so not actually as serious as it sounds.  

  

So in principle the complete clean-up-for-starting-over prescription is (in top CCP4 directory) to do:  

  

> make uninstall  

> make distclean


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/6075179.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-13
下一篇 2023-03-13

发表评论

登录后才能评论

评论列表(0条)

保存