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
相关文档:
VisualSVN增加密码php修改页面
1.假设VisualSVN安装在 C:\Program Files\VisualSVN Server
2.下载并安装php windows版本,假设安装在c:\php
可以到php官方网站下载 www.php.net
附件中带的是 php-5.3.2-Win32-VC6-x86.zip
3.VisualSVN增加php支持
注意修改 "c:/php/php5apache2_2.dll" 为正确路径
C:\ ......
function file_list($path) {
$handle = opendir($path);
if ($handle) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
if (is_dir($path."/".$file)) {
echo "<br /><br /><b> ......
从HTML文件中读取指定字符串
原贴地址:http://topic.csdn.net/u/20100322/10/d7401c38-10b7-4231-a323-454caf946fa6.html
2.
<a title="1" href="sdfds" m ......
<?php
//获得系统时间函数(注意参数中大写Y代表完整年份,小写y代表年份简写)
$sum = date("Y-m-d");
$sum1 = date("y-m-d");
echo "$sum<br/>";
echo "$sum1<br/>";
//md5加密函数
$pass = md5("张三");
......
Warning
: Illegal offset type in
Warning
: Illegal offset type in isset or
empty in
前几天写程序的时候碰到一个这种错误提示
如果你使用这样的表示方法如下:
$arr = array();
class a
{
}
$o = new a;
echo $arr[$o];
就会出现上面的错误提示,因为不能使用实例化的对象来作为数组的索引,或者在使用i ......