摘要: First, in sfWidgetFormTextareaTinyMce class we set:protected function configure($options = array(), $attributes = array()) { ...... $this->addOption('imagemanager_rootpath', 'mydir'); ...... }public function render($name, $value = null, $attributes = array(), $errors = array()) { 阅读全文
posted @ 2012-02-22 00:42 Lux.Y 阅读(355) 评论(0) 推荐(0)
摘要: <script type="text/javascript"> <!-- $(document).ready(function() { $(function(){ var $filter = $('div.sf_admin_filter'); // 想要被展开关闭的div var $title = $('div.show_hidden_filter'); // 切换事件 $filter.hide(); // 默认关闭 $title.toggle(function(){ ... 阅读全文
posted @ 2012-02-22 00:18 Lux.Y 阅读(955) 评论(0) 推荐(0)
摘要: Before the query, you putSET FOREIGN_KEY_CHECKS = 0 阅读全文
posted @ 2012-02-21 20:17 Lux.Y 阅读(157) 评论(0) 推荐(0)
摘要: Realtime Listing, going very popular, every guy searching for that, i have also spend lot of time to search the way to refresh page every x seconds. so i can update my ajax listing with new added records.after long search and try many method i found javascript function setInterval, all realtime list 阅读全文
posted @ 2012-02-17 01:19 Lux.Y 阅读(392) 评论(0) 推荐(0)
摘要: From: http://davidwalsh.name/execute-http-post-php-curlA customer recently brought to me a unique challenge. My customer wants information request form data to be collected in a database. Nothing new, right? Well, there's a hurdle -- the information isn't going to be saved on the localhost d 阅读全文
posted @ 2012-02-16 21:38 Lux.Y 阅读(395) 评论(0) 推荐(0)
摘要: After writing the article on Uploading photos to Facebook albums, I though it would be a good idea to tell my readers how to upload photos to your Facebook fan page. Uploading photos to the fan page is a bit different from uploading photos to your album. Here we need the access token of your Fan pag 阅读全文
posted @ 2012-02-10 23:54 Lux.Y 阅读(597) 评论(0) 推荐(0)
摘要: $q = array(1,2,30,40,50); $s = array(1,2,4,8,9,9,34,2,12,324,3,34,343); //共同的部分$m=array_intersect($q,$s); //老的数据$old=array_diff($q,$m);//新的数据$new=array_diff($s,$m); 阅读全文
posted @ 2012-01-24 01:57 Lux.Y 阅读(4014) 评论(0) 推荐(0)
摘要: 在Ubuntu11.10下,打开Windows的TXT乱码,按照以往的方法,在gconf-editor设置下并没有找到相应的选项解决乱码方案:打开终端输入:linuxsight@linuxsight-ODM:~$ gsettings set org.gnome.gedit.preferences.encodings auto-detected “['UTF-8', 'GB18030', 'GB2312', 'GBK', 'BIG5', 'CURRENT', 'UTF-16']“Fro 阅读全文
posted @ 2012-01-17 21:44 Lux.Y 阅读(276) 评论(0) 推荐(0)
摘要: Ubuntu默认不能解压RAR文件,Ubuntu11.10也一样,所以我们需要安装软件来支持。压缩功能安装:sudo apt-get install rar卸载:sudo apt-get remove rar解压功能安装:sudo apt-get install unrar卸载:sudo apt-get remove unrarlinuxsight@linuxsight-ODM:~$ sudo apt-get install unrar [sudo] password for linuxsight: 正在读取软件包列表… 完成 正在分析软件包的依赖关系树 正在读取状态信息… 完成 下列【新】软 阅读全文
posted @ 2012-01-17 21:40 Lux.Y 阅读(704) 评论(0) 推荐(0)
摘要: Up to last week I was exclusively an XCache user if we talk about PHP accelerators. Recently I needed to use APC with a symfony application. As symfony offers nice APC integration it went quite smooth.Note that just enabling PHP accelerator (any) improves performance because of the opcode caching. T 阅读全文
posted @ 2012-01-16 18:18 Lux.Y 阅读(1338) 评论(0) 推荐(0)
摘要: IntroductionAPC (Alternative PHP Cache) is a PHP opcode cache. It stores PHP pages in RAM and reduces hard disk activity. This makes a real difference to the performance in Moodle, and you should be able to achieve a 50% increase in system capacity and your CPU will be 50% less busy.This guide is fo 阅读全文
posted @ 2012-01-13 21:55 Lux.Y 阅读(386) 评论(0) 推荐(0)
摘要: Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)...I hate this message, in fact it says «You suck, you don’t even know what you’re doing with your objects». It happened recently when I was writing a script which retrieves old data from an old database, comp 阅读全文
posted @ 2012-01-06 21:12 Lux.Y 阅读(243) 评论(0) 推荐(0)
摘要: cURL is a great tool to help you connect to remote web sites, making it easy to post forms, retrieve web pages, or even to download files. In this PhpRiot Snippet I'll show you how you can download a file straight to disk using cURL.Note: To simplify our key points in this article we don't p 阅读全文
posted @ 2011-12-28 21:53 Lux.Y 阅读(1091) 评论(0) 推荐(0)
摘要: Downloading content at a specific URL is common practice on the internet, especially due to increased usage of web services and APIs offered by Amazon, Alexa, Digg, etc. PHP's cURL library, which often comes with default shared hosting configurations, allows web developers to complete this task. 阅读全文
posted @ 2011-12-28 21:51 Lux.Y 阅读(209) 评论(0) 推荐(0)
摘要: This is a simple helper to create a tag cloud from an array of tags.Creating a tag cloud is as easy as calling the helper:<?php use_helper('Tagcloud'); TagcloudHelper::showCloud($tags);Where tags is an array that is defined in the following syntax: array('tag1' => 10, 'tag2 阅读全文
posted @ 2011-12-13 18:19 Lux.Y 阅读(587) 评论(0) 推荐(0)