![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PHP/Python
Hone
这个作者很懒,什么都没留下…
展开
-
PHP: 关于php.ini的加载问题
Your PHP.INI file is not required to be in the C:/WINDOWS folder in XP. The trick is to make sure that the PHP.INI can be found.If you fail to reboot after adding the PHP folder to the path and creati原创 2009-02-21 16:40:00 · 278 阅读 · 0 评论 -
isset" or "array_key_exists"
文章转移:http://idoican.net.cn/原创 2010-10-13 11:43:00 · 295 阅读 · 0 评论 -
PHP语言中global和$GLOBALS[]的分析
原来以为global和$GLOBALS除了写法不一样以为,其他都一样,可是在实际应用中发现,2者的区别还是很大的!先看下面的例子:<?php // 例子1 function test_global() { global $var1, $var2;转载 2011-07-08 15:27:39 · 67 阅读 · 0 评论 -
9 Useful PHP Functions and Features You Need to Know
Twice a month, we revisit some of our readers’ favorite posts from throughout the history of Nettuts+.Even after using PHP for years, we stumble upon functions and features that we did not know about. Some of these can be quite useful, yet underused. With转载 2011-03-09 13:08:00 · 229 阅读 · 0 评论 -
Why You’re a Bad PHP Programmer
<br /><br />We all have our bad habits. In this article, we’ll go over a list of bad practices that are worth examining, reevaluating, and correcting immediately.<br /> Who the Hell Do You Think You Are?<br />Every time I open a project that isn’t mine, it转载 2011-03-09 13:05:00 · 492 阅读 · 0 评论 -
格式: echo "/033[字背景颜色;字体颜色m字符串/033[0m"
格式:echo "/033[字背景颜色;字体颜色m字符串/033[0m"例如:echo "/033[41;36m something here /033[0m" 参数:==============字背景颜色范围:40----49 40:黑 41:深红 42:绿 43:黄色 44:蓝色 45:紫色 46:深绿 47:白色 ==============字颜色:30-----------39 30:黑 31:红 32:绿 33:黄 34:蓝色 35:紫色 36:深绿 37:白色================转载 2010-11-08 18:03:00 · 432 阅读 · 0 评论 -
Howto optimize your PHP installation to handle large file uploads.
<br />You can call the phpinfo() function to find the location of your php.ini file, it will tell you the current values for the following settings that we need to modify file_uploadsupload_max_filesizemax_input_timememory_limitmax_execution_timepos原创 2010-10-11 11:47:00 · 93 阅读 · 0 评论 -
Howto: install phplua extension for PHP
Lua is an embeddable scripting language. If you are trying to embed it in PHP follow this instructions that may help you:$ sudo apt-get install liblua5.1-0-dev $ git clone git://repo.or.cz/phplua.git src$ cd src/$ phpize$ ./configure At this point原创 2010-09-30 14:57:00 · 654 阅读 · 1 评论 -
mb_convert_encoding中,from_encoding的查找顺序
<br />string mb_convert_encoding ( string $str , string $to_encoding [, mixed $from_encoding ] ) <br />Converts the character encoding of string str to to_encoding from optionally from_encoding.<br />Is specified by character code names before conversion.原创 2010-08-17 18:37:00 · 247 阅读 · 0 评论 -
PHP中数组循环语句foreach和while的速度之辩
PHP进行大量的数组循环操作,主要有两种方式,一种是foreach,另一种是while,到底哪种好哪种坏一直有争论,为了以后能节省点CPU时间,下面总结一下:在循环里进行的是数组“读”操作,则foreach比while快:foreach ($array as $value) { echo $value; } while (list($key)转载 2010-03-22 14:56:00 · 1228 阅读 · 0 评论 -
Save session value - then header redirect
The problem is some times the redirect may kick you off to the nextpage before all the session variables have been saved. The truesolution to lost session vars on redirect is to simply call sessio原创 2009-12-01 15:38:00 · 271 阅读 · 0 评论 -
CI: escape_str()导致的问题:数据json_encode之后,汉字的unicode编码被破坏
问题描述:对post的数据json_encode之后,汉字的unicode编码被破坏。 如:“胡”的unicode编码为:/u80e1,encode之后,“/”被删除。弯路:我用的是SQLite数据库。以为是编码的问题,我搞了一下午,最后发现,是stripslashes这个函数在搞鬼。问题解决:system/database/drivers/pdo/pdo_driver.php中的原创 2009-05-13 11:16:00 · 1648 阅读 · 0 评论 -
PHP: 获取input checkbox组的值
//test.php$i = count($tf);for($n=0;$n < $i;$n++){//$tf[$n]就是选中的值。}原创 2009-03-25 11:12:00 · 903 阅读 · 0 评论 -
Codeigniter: 在CI框架中使用sqlite
http://www.php.net/manual/zh/ref.sqlite.php 在php5中,将extension=php_pdo.dll和extension=php_pdo_sqlite.dll打开http://codeigniter.com/wiki/PDO_SQLite3/CodeIgniter/system/database原创 2009-02-21 16:55:00 · 1433 阅读 · 0 评论