- 博客(16)
- 资源 (1)
- 收藏
- 关注
原创 php STDIN
最近在看perl,觉得perl的标准输入挺好的,就想找找看PHP的,原来PHP也有类似的啊,我真OUT了 while($str = fread(STDIN,1000)){ echo "you print:".$str; } <?php //PHP CLI中,有三个系统常量,分别是STDIN、STDOUT、STDERR,代表文件句柄。 /** *@ 标准输入
2011-10-25 17:11:25 4727 1
原创 MYSQL导入导出.sql文件
<br />一.MYSQL的命令行模式的设置: 桌面->我的电脑->属性->环境变量->新建-> PATH=“;path/mysql/bin;”其中path为MYSQL的安装路径。 二.简单的介绍一下命令行进入MYSQL的方法: 1.C:/>mysql -h hostname -u username -p 按ENTER键,等待然后输入密码。这里hostname为服务器的名称,如localhost,username为MYSQL的用户名,如root。 进入命令行后可以直接操作MYSQL了。 2.简
2011-03-12 22:52:00 542
转载 LINUX下SVN命令大全
<br /><br />1、将文件checkout到本地目录<br /> <br />svn checkout path(path是服务器上的目录,local_folder 是本地目录 即check out到当前目录下的local_folder文件夹) 例如:svn checkout svn: // 192.168 . 1.1 / pro / domain local_folder 简写:svn co <br /> <br />2、 往版本库中添加新的文件<br />svn add fi
2011-01-19 11:03:00 449
原创 ezpublish fetch object filter by user's avtive status
<br />content_actionhandler.php:<br /><?php /* #?ini charset="iso-8859-1"? #Filter Name: [user_is_enabled] #Where it is stored (our current extension) ExtensionName=intranet #The name of the class in which we will store the filter ClassName=UserFilte
2011-01-14 19:09:00 415
转载 Extended Attribute Filters in eZ Publish
<br />For a previous article I covered the various ways you can export user data using eZ Publish. In the article, I suggested how you can export all users who have logged in over the previous month using an extended attribute filter. In this article
2011-01-14 19:03:00 760
原创 main_node of ez object
<br />{foreach $all_child_nodes as $key=>$child_node} {*append all the child node to an array*} {set $children_node_arr=$children_node_arr|append($child_node.node_id)} {if$child_node.is_main} {if count($child_node.object.assigned_nodes)|eq(2)}
2011-01-13 19:38:00 351
原创 Drupal search module
<br />要使用drupalsearch,首页要到后台模块管理开启search模块,然后重建索引,运行cron 。<br />这样就可以使用了 。search 重建索引大概只涉及到core表 。比如 node title node body。<br />如果想搜索cck等额外的内容,可以借用其他模块 。比如faceted_search , field_indexer, cck_facets等模块结合 。但是往往依靠模块可能不是很灵活 。这是可以自己根据drupal search 提供
2011-01-13 13:30:00 720
原创 drupal t() function
<br />The wrong way:<br />drupal_set_message(t(“You just created the post: “. $node->title));<br /> The right way:<br />drupal_set_message(t(“You just created the post: @title “, array(’@title’ => $node->title)));<br /> t()<br /> The t function tak
2011-01-13 13:29:00 540
原创 ezpublish script
/* here is a example of how to write a script for ezpublish by pengbihao. */ require 'autoload.php'; $isQuiet = false; $cli = eZCLI::instance(); $script = eZScript::instance( array( 'description' => ( "eZ Publish EzOE Update Custom Tags/n" .
2011-01-13 13:24:00 395
原创 when the preview menu is diabled in BO, you can add this setting to enabled it
To enable users to change their Administration Interface preferences (for example their preview tab preferences), add the following line to the [Toolbar_admin_right] block in settings/siteaccess //toolbar.ini.append.php :Tool[]=admin_preferences So th
2011-01-13 13:23:00 749
原创 how to fetch all ancestor node id of a node(ezcontentobjecttreenode).
$node.path_array
2011-01-13 13:21:00 395
原创 use a Content action handlers to add comment for node
the config of Content action handlers,you can check http://blog.csdn.net/pengbihao/archive/2011/01/13/6134436.aspxin template,the form should like this:Poster un commentaire
2011-01-13 13:12:00 2108
原创 ez Content action handlers
<br />Content action handlers are always placed in an extension.settings file path: myextension/settings/content.ini.append.phpsetting: [ActionSettings] ExtensionDirectories[]= myextensionPHP file path: myextension/actions/content_actionhandler.phpPHP func
2011-01-13 13:05:00 499
原创 a bug of ez4.3
<br />in ez4.3,when you remove a location of a node,it will get a error:<br />I had the PHP fatal errors : <br /> Fatal error: Call to undefined method eZSearchEngine::removeNodes() in /home/www/sites/acl.lu/www/html/kernel/content/ezcontentoperationcol
2011-01-13 13:03:00 344
原创 test
$db = eZDB::instance(); $sql_id ='SELECT `contentobject_id` , max( `version` ) as mvson FROM `ezcontentobject_attribute` WHERE `data_text` LIKE /'%%/' AND `data_type_string` LIKE "ezxmltext" GROUP BY `contentobject_i
2010-12-06 11:38:00 327
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人