草庐IT

result_index

全部标签

php - CodeIgniter:通过 ActiveRecord 结果 ID 将 $subresult 添加到对象 $result

我在向Codeigniter中的结果添加“子结果”时遇到问题。不确定如何添加到此对象。$result->{$record_id}->threads=$threads;应该等于这样$result->1->threads=$threads;但我无法让它工作...我不是OOP的新手,但这是我第一次尝试这样做。db->select(array('record_id','record_data','record_date',));$this->db->from('records');$sql=$this->db->get();$records=$sql->result();foreach($re

php - 警告 : mysql_data_seek(): Offset 1 is invalid for MySQL result index 5 (or the query data is unbuffered)

请任何人提供帮助。我正在尝试执行以下php代码:$sql="SELECT*FROMvendorsWHEREvuid=".$uid."ANDstatus="."'c'";$sql=$sql."LIMIT0,10";$result=mysql_query($sql);$numrows=mysql_num_rows($result);for($i=0;$i0){mysql_data_seek($result,$i);}我收到以下错误警告:mysql_data_seek():偏移量1对于MySQL结果索引5无效(或查询数据未缓冲)。$numrows为2,因此mysql_data_seek的范围

php - 故障排除 "Warning: mysqli_result::fetch_array() expects parameter 1 to be long, object given"

我收到的警告是:Warning:mysqli_result::fetch_array()expectsparameter1tobelong,objectgivenin...line103.我在第103行旁边注释了while($row=$result->fetch_array($result)){问题2:我可以将其中的任何内容存储在包含文件中吗?问题3:对于$query,我可以将这些Buyer、Seller中的任何一个存储在某个数组中吗?怎么办?/*FETCHCONTACTINFORMATION*/$query=("SELECT*FROMcontactsWHEREcontacttypeI

php - 我可以安全地删除 codeigniter 中每个目录中的 index.html 文件吗?

在我的codeingiterWeb应用程序中,目录“application”和“system”内的每个子目录都有一个index.html文件。在这个HTML文件中,有一条看起来像是标准错误消息的内容。它包含以下代码:403ForbiddenDirectoryaccessisforbidden.我假设创建这些文件是为了如果有人试图访问“应用程序”或“系统”中的目录,它不会列出所有文件,而是会显示错误。这些似乎是多余的,因为我在每个目录中添加了一个.htaccess以拒绝所有访问。这两个目录中的每个PHP文件也有第一行:if(!defined('BASEPATH'))exit('Nodir

php - 从根目录中带有 Wordpress 的子文件夹中的 Codeigniter URL 中删除 index.php

我在服务器子文件夹中的Codeigniter应用程序以及文档根目录中安装的Wordpress方面遇到了一些问题。如果我用.htaccess隐藏CodeigniterURL的index.php/codeigniter/.htaccessDirectoryIndexindex.phpRewriteEngineonRewriteBase/RewriteCond$1!^(index\.php|user_guide|robots\.txt)RewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule^(

php - 删除 CI ubuntu 12.04 中的 index.php 文件

我想从CI的文件路径中删除index.php文件。我正在使用ubuntu12.04。我尝试了几乎所有的论坛结果,但没有成功。我把CI文件夹放在这个路径下。http://localhost/xxx/CI/我有apacherewritemodenable。sudoa2enmodrewriteModulerewritealreadyenabled我的conf.php文件中也有这个$config['uri_protocol']='AUTO';$config['base_url']='http://localhost/xxx/CI/';$config['index_page']='';$conf

php - 无法删除 index.php,自定义路由不起作用

我知道这个问题更适合服务器故障,但不幸的是,我因质量低劣的问题而被禁止(我对我提出的2-3个问题投了反对票。)所以下一个提出这些问题的最佳地点是这里。我有两个与CodeIgniter路由相关的问题。第一个问题是我似乎无法摆脱url中的index.php。我关注了instructionsonhowtoremoveit.我在我的WAMP服务器根目录下的.htaccess文件(见下文)中有以下mod重写代码(CI位于根目录,而不是在它自己的文件夹中)。我在httpd.conf文件LoadModulerewrite_modulemodules/mod_rewrite.so中取消了这一行的注释。

php blowfish 哈希与 crypt() : the CLI result differs from webserver's one

当我使用使用Blowfish算法的php函数crypt()时withweb-server:我得到这个结果:$2a$10$7711cbpe58dfpogiu0498u5Vh773A3qx.3LE3ro3NX7F9c9N7.pOm但是如果我使用PHP解释器命令行:php-r"echocrypt('SAD123',sprintf('$2a$10$%s','7711cbpe58dfpogiu049857f011werb0'));"我得到另一个结果:a0SqNHxQ8/2mA你有什么想法吗?系统是:Apache/2.2.3(CentOS),PHP版本5.4.26 最佳

php - Apache 使用 https 全部重定向到 index.php

我已经阅读了很多关于这个主题的答案,但没有人提到如何结合:将所有流量重定向到index.php+将所有http重定向到httpS以下内容非常适合将所有内容重定向到index.php:RewriteEngineOnRewriteBase/RewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteCond$1!^(index\.php|public|css|js|robots\.txt)RewriteRule^(.*)index.php/params=$1[L,QSA]在我这样做之前,我能够使用这个强制

php - CodeIgniter 从 url 中删除 index.php

我知道这个问题已经被问过很多次了。但是,我仍然无法摆脱index.php网址。它阻止我直接访问我的Controller。我目前正在使用CodeIgniter2.2.2。以下是我的.htaccess文件:RewriteEngineOnRewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule^(.*)$index.php/$1[L]应用/配置://Findthebelowcode$config['uri_protocol']="AUTO"//Replaceitas$config['uri_pr