草庐IT

dm_db_index_usage_stats

全部标签

php - 如何在登录和注销时两次使用/(index) 路由?

我正在做一个Laravel项目。该项目有一个公共(public)部分(站点的非认证部分)和一个认证部分(管理员)。我正在尝试使用/路由来显示公共(public)主页View,然后在通过身份验证时,我希望使用相同的/路由来显示经过管理员身份验证的View。这是尝试的代码:routes.phpRoute::auth();Route::get('/',function(){returnview('Public.home');});Route::group(['middleware'=>['auth']],function(){Route::get('/',function(){returnv

php - DB 中的双引号破坏 HTML 输出

我什么都试过了,还是想不通。addslahes()、str_replace()、htmlentities(),我只是不明白为什么我的网站上没有显示双引号。$sql=$con->prepare("SELECT*FROM`user_settings`WHERE`user_session`='$user_session'");$sql->execute();$result=$sql->fetchAll(PDO::FETCH_ASSOC);foreach($resultas$row){$advertising_1=$row['advertising_1'];$advertising_2=$ro

php - 如何让 NGINX 通过 index.php 执行文件夹中的所有 URL

我为此搜索了很多答案,但找不到合适的答案。基本上,我有一个在NGINX上运行的SilverStripe构建的站点。一切正常,但我希望通过站点根目录中的index.php解析通过管理员(到Assets文件夹)上传的任何文件/图像(这样我们可以在返回之前检查管理员中设置的文件的权限给用户)。我有一个非常简单的nginx配置(用于我的本地docker实例):server{includemime.types;default_typeapplication/octet-stream;client_max_body_size0;listen80;root/var/www/html;location

php - 如何使用 Zend_Db_Adapter 在每次调用 "query"时运行多个 SQL 查询?

这是我编写的一个Zend_Application_Resource,用于在部署中进行更改时自动更新模式。getOptions();$version=(int)$options['version'];return$version;}/***Returnstheversionthedatabasethinksitis.**@returnint*/privatefunctionGetDbVersion(){$adapter=Zend_Db_Table::getDefaultAdapter();$metadataTable=newCas_Model_Table_Metadata;$verQue

php - 从 codeigniter url 中删除 index.php

我是codeigniter的新手。我在localhost/path/learn_ci安装了我的codeigniter。我已遵循codeigniterwiki中给出的所有步骤。这是我的.htaccess文件。RewriteEngineOnRewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule^(.*)$/learn_ci/index.php/$1[L]ErrorDocument404/index.php我还根据需要更改了配置文件。但是当我尝试访问我得到这个错误"TherequestedUR

php - 无法使用 vagrant 和 virtualbox 使用 apache 加载 index.php 页面

这是我的vagrantfile:#-*-mode:ruby-*-#vi:setft=ruby:Vagrant.configure("2")do|config|#AllVagrantconfigurationisdonehere.Themostcommonconfiguration#optionsaredocumentedandcommentedbelow.Foracompletereference,#pleaseseetheonlinedocumentationatvagrantup.com.#EveryVagrantvirtualenvironmentrequiresaboxtobu

php - 您可以在 index.php - Fat Free Framework 中使用配置文件中的全局变量吗?

我想在我的config.ini文件中设置一个名为CONTROLLERPATH的全局变量,然后在我的index.php文件中使用该变量将GET请求路由到我的目录结构中的正确Controller。我正在执行以下操作,但F3无法确定CONTROLLERPATH的值。我的config.ini文件:[global]DEBUG=3UI=ui/CONTROLLERPATH='app/controllers/'在我的index.php文件中:$f3->config('config.ini');$f3->route('GET/',CONTROLLERPATH.'indexController->inde

php - 由于 index.php 导致 Codeigniter 500 内部服务器错误

我正在使用codeigniter框架,当我将它上传到主机时,它给了我一个500内部错误。但是当我将index.php添加到config.php时,它起作用了。我该怎么办?在我的.htaccess中我有这个:RewriteEngineOnRewriteBase/ci-framework/而且,当我从RewriteBase的末尾清理/ci-framework/时,它也不起作用。非常感谢。 最佳答案 您不需要在config.php文件中添加index.php。确保您在.htaccess文件中有以下行:RewriteEngineOnRewr

php - 我在使用 Index.php 加载主页时收到 404,但 index.php 在直接链接上工作,为什么?

我似乎无法理解为什么我的Homepage突然拒绝直接加载,即:www.mysite.com/但加载仅当您键入www.mysite.com/index.php时这是网站:比较:http://www.propasiarealty.com//Sendsyoutothe404page鉴于:http://www.propasiarealty.com/index.php//Loadsthehomepage.无法弄清楚到底哪里出了问题,请帮忙。下面是Filezilla的截图:编辑01请看我的HTACCESS...快照更新02我修改了HTACCESS还是没有成功,现在看起来是这样的:Directory

PHP_SELF 返回/index.php/index.php

为什么$_SERVER['PHP_SELF']返回/index.php/index.php??请求http://example.com输出/index.php/index.php索引.phpnginx.confserver{listen80;server_namedomain.com;root/var/www/public/www;#Addtrailingslashrewrite^([^.\?]*[^/])$$1/permanent;location/{try_files$uri$uri//index.php?$query_string;}location~\.php${include