Tag Archives: php

我的php.ini模版

[PHP] ;;;;;;;;;;;;;;;;;;;; ; Language Options ; ;;;;;;;;;;;;;;;;;;;; engine = On zend.ze1_compatibility_mode = Off short_open_tag = Off asp_tags = Off precision = 14 y2k_compliance = On output_buffering = On zlib.output_compression = Off implicit_flush = Off unserialize_callback_func= serialize_precision = 100 allow_call_time_pass_reference = … Continue reading

Tagged | Leave a comment

php报错链接到php manual

在写php程序的时候,有时候函数有误,php报错的函数紧跟着这个函数的链接,一般情况下我们打开都是不存在的页面。那是因为没有设置。 设置方法: 到http://php.net/docs.php下载php manual,格式选择many HTML file解压到本地 F:\book\php\php-chunked-xhtml 目录。 php.ini加入以下设置: docref_root = “/phpmanual/” docref_ext = .html apache加入以下Alias设置: #phpmanual Alias /phpmanual “F:/book/php/php-chunked-xhtml/” <Directory “F:/book/php/php-chunked-xhtml/”> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Allow from all </Directory> 重启apache服务器。点击[function.mysql_connect.html]自动跳转到对应函数的文档。

Tagged | Leave a comment

Deprecated: Function set_magic_quotes_runtime() is deprecated

Deprecated: Function set_magic_quotes_runtime() is deprecated 导致这个提示的原因是在PHP5.3后此特性(set_magic_quotes_runtime())已经关闭。 而且在PHP6中已经完全移除此特性。 你可以注释或者删除掉出错的行,或者是在set_magic_quotes_runtime()前面加@符号。 This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged. gusb at NOSPAM dot mailinator dot com 10-Oct-2011 11:14 You should NEVER rely on magic quotes or addslashes for … Continue reading

Tagged | Leave a comment

没有接收到要导入的数据。可能是文件名没有提交,也可能是文件大小超出 PHP 限制。 如果在导入mysql数据库时,提示“没有接收到要导入的数据。可能是文件名没有提交,也可能是文件大小超出PHP限制。参见FAQ 1.16。” 修改方法: php.ini中默认 upload_max_filesize = 2M 如果你上传的文件超过这个限制,请修改。修改后重新启动php环境即可;

Posted on by tunpishuang | Leave a comment

iwms网站管理系统刷票 http://tunps.com/lab/iwms_vote.php

Posted on by tunpishuang | Leave a comment

php递归搜索指定目录的指定文件内的正则表达式后的数组并追加到数组中。 以前在SO上问过这样的问题,不过这次又有了新了变化,就再问了一次,看来哥举一反三的能力还太差了。 之前问的,和递归有关的问题: http://stackoverflow.com/questions/5442612/how-to-return-the-data-of-an-iterate-function-in-codeigniter http://stackoverflow.com/questions/2817088/strange-array-in-php http://stackoverflow.com/questions/2627000/how-to-write-a-function-to-output-unconstant-loop 现在问到 http://stackoverflow.com/questions/6786127/how-can-recursion-function-return-accumulative-arrayarray-merge-php 最后在SO上高手的帮助下写成: http://tunps.com/lab/playlist.php 需求是这样的(其实是现在的公司做离线订单,需要提取唯一的内容id列表,提高效率。偷懒,直接从SO复制过来): function file_list($path){     $final_result=array();     if ($handle = opendir($path)) {         while (false !== ($file = readdir($handle))) {             … Continue reading

Posted on by tunpishuang | Leave a comment

Call to a member function on a non-object Oracle CLOB类型数据不能为null,否则php读取它的时候不能作为一个对象处理,而是当作null,所以对于值为null的CLOB数据的read() or size()函数都是无效的。

Posted on by tunpishuang | Leave a comment

为了兼容php4,php5声明属性依然可以直接使用关键字var 或者放在public, protected, or private之前。但是var并不是必须的。在php 5.0 到5.1.3,var会认为是废弃的, 而且抛出E_STRICT警告,但是5.1.3之后就不再认为是废弃,也不会抛出警告。 如果直接使用var声明属性,而没有public, protected, 或 private,php 5 会认为这个属性为public。

Posted on by tunpishuang | Leave a comment

#167 codeigniter oci8 database driver do not support setting charset and session_mode while ocilogon() to oracle db

system/database/drivers/oci8/oci8_driver.php line 80 db_connect() function did not support set the charset and session mode while connecting to oracle db. function db_connect() { return @ocilogon($this->username, $this->password, $this->hostname); } function db_pconnect() { return @ocilogon($this->username, $this->password, $this->hostname); } here is the prototype of … Continue reading

Tagged , , , | Leave a comment

codeigniter配置oracle数据库连接

Connection Parameters Not all of the parameters in application/config/database.php are used as one might expect.  Namely, $db[‘default’][‘database’] isn’t used at all.  The value used for $db[‘default’][‘hostname’] depends on whether the Oracle client’s tnsnames.ora file exists and contains information about the … Continue reading

Tagged , , | Leave a comment