magento 使用第三方PHP库
Magento遵循一般的方法使用第三方PHP库,即:将php库放到某个目录下,在php.ini或程序头部指定该目录或者父目录指定为include_path,然后程序中使用include_once相对路径包含具体引用的php文件
Magento的lib目录已经默认指定为include_path里了,所以如果有3rd包如Varien放到lib目录下,有一个php文件全名为$magento_home/lib/Varien/Object.php
那么在Magento的代码中只要:include_once('Varien/Object.php'); 就可以调用里面的类和函数了。
出处:http://koda.javaeye.com/blog/634538
相关文档:
1: apache服务器安装.apache_2.0.59-win32-x86-no_ssl.msi。
修改conf\httpd.conf中的文件,修改位置为:
DocumentRoot "c:/webpage" 设置虚拟目录 c:/webpage.
DirectoryIndex index.html index.html.var index.php
==使apache服务器识别php的扩展名。
在<Directory "c:/pr ......
从HTML文件中读取指定字符串
原贴地址:http://topic.csdn.net/u/20100322/10/d7401c38-10b7-4231-a323-454caf946fa6.html
2.
<a title="1" href="sdfds" m ......
遍历目录文件,替换编码部分,删除原文件,再重新转码原文件内容,重新生成新文件。
function explorerdir($sDir){
static $aTempArr=array();
$dp=opendir($sDir);
while ($sFileName = readdir($dp)){
if ($sFileName !='.' && $sFileName !='..'){
......
<?php
//声明数组变量
$arr = array('张三','李四','王五','李明');
//foreach循环遍历数组
foreach($arr as $value){
//注意“$value”后必须要一个空格,否则输出的结果不正确
echo "$value<br/>";
}
?> ......