草庐IT

undefined-index

全部标签

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

php - fatal error : Call to undefined function mb_strtolower(): enable mbstring on linux EC2

我已经通过sudoyuminstallphp-mbstring在我的带有php5.6.17的linuxEC2实例上安装了mbstring。我怎样才能启用它? 最佳答案 需要使用yuminstallphp56-mbstring。安装后,无需配置,只需重启httpd服务即可 关于php-fatalerror:Calltoundefinedfunctionmb_strtolower():enablembstringonlinuxEC2,我们在StackOverflow上找到一个类似的问题:

php - Codeigniter 链接在 url 中没有 index.php 的情况下无法工作

我开发了一个使用codeigniter的Web应用程序,我的Web应用程序的所有URL结构如下:/Admin/Promotions这种类型的链接在我的Localhost上运行良好,但在我的托管服务器上不起作用(我正在使用Godaddy托管)但是一些在URL中有index.php的链接也在本地主机和服务器上工作,这个链接之王的结构是index.php/Admin/Pramotions我应该怎么做才能使没有index.php的URL正常工作??我的HTACCESS:RewriteEngineOnRewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{RE

PHP : session variable having an undefined offset error

我是PHP编程的新手。我正在创建一个带有session的简单登录表单。我传递了两个session变量:$_SESSION['username']和$_SESSION['logon'].这是我的代码:$rowcount=mysqli_num_rows($result);if($rowcount==1){session_start();$_SESSION['logon']=="online";$_SESSION['username']=$username;header("location:../index.php?username=$_SESSION[username]");}问题是,当我

PHP 警告 : Use of undefined constant PASSWORD_ARGON2ID when using password_hash() in php 7. 3

我最近通过Plesk的WebGUI安装了PHP7.3.6作为Web应用程序的开发副本,因为我打算将我们的生产环境从php7.0更新到7.3。我决定借此机会将我们的密码散列从PBKDF2升级到Argon2ID,因为PHP核心已经包含了它。我很惊讶地收到一条警告,指出PASSWORD_ARGON2ID常量未定义,因为我知道它是在php7.3.0中添加的。我尝试搜索此错误的任何实例,我发现唯一相关的是Laravel论坛中的这篇未详细说明的帖子:https://laracasts.com/discuss/channels/laravel/use-of-undefined-constant-pa

PHP/Apache,htaccess 中的选项 +indexes 不适用于根目录

我需要提供我网站的根目录的目录列表,所以我创建了一个.htaccess文件,其中包含options+indexes它适用于子目录,但对于主目录,我得到了RedHatEnterpriseLinux上ApacheHTTP服务器的测试页面页面。我有两个站点,除了安装的PHP版本外,它们完全相同。在一个站点(PHP5.2.1)上,该技术运行良好。另一方面(PHP5.2.9),它没有。据我所知,Apache安装是相同的,并且我验证了httpd.conf文件是相同的。在这两个站点上,htaccess都适用于子目录。我的问题是主站点目录。我的目标是创建基于目录列表的简单网站,类似于znvy.com.

php - undefined offset : 1

在我当前的PHP脚本中出现此错误:undefinedoffset:1我的代码在这里:$query="SELECTitem_id,username,item_contentFROMupdatesORDERBYupdate_timeDESCLIMIT".$start.",".$number_of_posts;$result=mysql_query($query)ordie(mysql_error());while($row=mysql_fetch_assoc($result)){preg_match("/(.*)/",$row['item_content'],$matches);$row[

PHP 获取 "Undefined Variable and "空属性“代码错误

这个问题在这里已经有了答案:关闭10年前。PossibleDuplicate:PHP:“Notice:Undefinedvariable”and“Notice:Undefinedindex”我已将此错误减少到最少的代码量,而且它是如此之少,以至于我在这里真的感到很愚蠢。我有2个文件class1.php:1thisisatestparagraph';5protected$bigHeader='header1';6protected$textArray;78publicfunction__construct(){9$this->$textArray=array($this->$bigHea

php - CodeIgniter:删除 WAMP 上 URL 中的 "index.php"

在CodeIgniter中,我想在我的本地主机(WAMP)上删除URL中的“index.php”。例如,http://localhost.com/ci/index.php/controller/function至http://localhost.com/ci/controller/function我变了$config['index_page']='index.php';to$config['index_page']='';我的.htaccess文件(位于根目录下,index.php所在)如下:RewriteEngineOnRewriteBase/igniter#Removesacces