By admin, 27 四月, 2015

理解本文需要先知道如何创建一个Drupal 7模块。

1. Drupal 7的文件目录分类

Drupal 7的文件API分为unmanaged file和managed file两种类型,managed file会在数据库中记录文件的信息及引用记录。

Drupal文件对象有一个uri属性,它的形式如public://myfile.jpg,通过file_create_url($file->uri)可以把uri转换成web可访问的路径,如http://howto.eguidedog.net/sites/default/files/myfile.jpg

Drupal内建了public、private和temporary流报装器(stream wrapper),PHP文件操作函数可以直接操作这些uri,例如我们可以通过filesize(‘public://myfile.jpg')获取文件大小,而不需要先转换成本地文件的地址。

Drupal中的private目录应该是放在一个不能直接从Web访问的目录,其内容通过PHP返回(这里有一个副作用是增加了系统开销)。

标签

By admin, 16 四月, 2015

Alias /perl/ /home/hgneng/www-perl/
PerlModule ModPerl::Registry

<Location "/perl/">
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
</Location>

标签

By admin, 14 四月, 2015

a secret of the third tone
Falling-rising.
Third + Third = Second + Third: nǐ hǎo should sound like níhǎo.
Third + Second = Half a Third Tone + Second.

句末时第3声会有变化:

The 3rd tone can be produced in three different ways:

first half of a "3rd tone",

second half of a "3rd tone",

full 3rd tone

标签