php config
php config
1.安装Apache2.2
2.安装php5.2(注意选择所有的库文件)
3.将phpMyAdmin解压,拷贝至Apache2.2\htdocs\phpmyadmin(该路径可以自由改变)下。
4.修改配置文件:
1)修改php.ini
具体操作:
extension_dir = "C:\Program Files\PHP\ext" (536)
extension=php_mysql.dll (640)
2)修改httpd.conf
具体操作:
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll" (127)
(240)
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
(385)
AddType application/x-httpd-php .php
DirectoryIndex index.htm
DirectoryIndex index.php
3)配置phpMyAdmin
从\phpmyadmin\libraries中拷贝一个config.default.php,将其拷至\phpmyadmin目录下,并重命名为:config.inc.php
修改config.inc.php:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
4)将PHP目录下的php.ini、libmysql.dll、php_mysql.dll(PHP/ext目录下)拷贝至system32目录下。
5.重启PC.
相关文档:
作者:Martin Streicher, 软件开发人员, Pixel, Byte, and Comma
尽管编写一个 PHP 扩展并不是很困难,而 SWIG 的确进一步简化了这项任务,这主要是因为它自动化了结合 PHP 与 C 或 C++ 所需的工作。若给定对一个函数的描绘 — 函数的名称及其形参 — SWIG 就会生成一个包装程序来将 PHP 与低层代码连接起来。
......
<?PHP
$word = new COM("word.application") or die("Can't start Word!");
// print the version of Word that's now in use
echo "Loading Word, v. {$word->Version}";
// set the visibility of the application to 0 (false)
// to open the application in the forefront, use 1 (true)
$word->Visibl ......
如何通过PHP将excel的数据导入MySQL中
在开发PHP程序时,很多时候我们会有将数据批量导入数据库的需求,如学生信息批量添加到数据库中,而事先用excel编排好,对excel实行操作,便是我们比较常用的选择方式。
在对excel的操作中,phpExcelReade便是很多人的共同 ......
对 CodeIgniter 的介绍
大多数PHPer都想写出运行状态良好的应用程序,而且希望尽可能做得简单且不费事。这篇文章是有关 CodeIgniter的(以后简称CI),CI是一个达成上面目的的所谓框架。
如果你只是要达成一个最终的结果,而把中间所有的编码细节和复杂统统丢给一个框架,CI是你最好的朋友。
CI有很多优点:免费, 轻量级, ......
<?
//------------------------
// PHP内置字符串函数实现
//------------------------
//字符串长度
function strlen ($str)   ......