易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

我的第一个PHP程序

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</ ......

php基础应用:php批量转换文件编码

遍历目录文件,替换编码部分,删除原文件,再重新转码原文件内容,重新生成新文件。
function explorerdir($sDir){

static $aTempArr=array();
$dp=opendir($sDir);
while ($sFileName = readdir($dp)){

if ($sFileName !='.' && $sFileName !='..'){

......

PHP中foreach循环遍历数组

<?php
 
  //声明数组变量
  $arr = array('张三','李四','王五','李明');
 
  //foreach循环遍历数组
  foreach($arr as $key => $value){
   //注意“$value”后必须要一个空格,否则输出的结果不正确
   echo "值$value 的下标为$key<br/ ......

[php]how to confirm deleting without using form.

<html>
<head>
<script type="text/javascript">
<!--
function confirmDelete()
{
    return confirm("Are you sure you wish to delete this entry?");
}   
//-->
</script>
</head>
<body>
<% $var1 = 2;%> ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号