草庐IT

spatial-index

全部标签

php - 如何让 index.php 控制 PHP 中的任何内容

首先,我不知道怎么称呼这个东西:)我想知道如何实现我的目标的关键、结构和示例。例如,我不想创建单独的文件,如register.php、login.php、about.phpfaq.php。在这里,我希望register、loginabout、faq等将由index.php处理,例如index.php?p=register如何创建类似这样的页面以及这种结构在PHP编程中调用的内容。让我知道。 最佳答案 在index.php?p=register中,?之后的部分称为“查询字符串”。PHP会默认为您解析它并提供超全局的$_GET。自己试试

php - Notice : Undefined Index. 如何定义索引?

我收到了回复:Notice:UndefinedindexyyinPage1.phponline11Notice:UndefinedindexmminPage1.phponline12Notice:UndefinedindexddinPage1.phponline13如何定义这些yy、mm、dd?2001//...Another100years12//...another10months12//...another29days 最佳答案 尝试将这些post变量包装在isset中功能:$_SESSION['yy']=isset($_PO

php - WordPress 主题 : Standalone theme need index. php 文件错误

我在编码时突然遇到错误-wordpress->theme:我不明白为什么会这样,因为我有一个index.php页面。也有css样式表。style.css也有如下注释样式.cssThemeName:samirThemeAuthor:samirAuthorURI:www.wordpress.comVersion:1.0Description:ThisisacoolthemeTemplate:Test1这是文件夹结构wordpress新手。很困惑为什么主题被破坏并且没有出现在wordpress中。有什么想法吗? 最佳答案 解决方案解决办法

php - index.php/index.html 文件中模糊的 JavaScript 代码

也许这里有人可以提供帮助或解释发生了什么。今天刚刚注意到,在我的一个客户站点上,所有index.php/index.html都被替换了,并且添加了一些晦涩的javascript代码。代码如下:varnhZE2uSD="Ow8xN18Ow8xN31";varusW1446O0="Ow8xN3cOw8xN73Ow8xN63Ow8xN72";varusW1446O1="Ow8xN69Ow8xN70Ow8xN74Ow8xN20";varusW1446O2="Ow8xN74Ow8xN79Ow8xN70Ow8xN65";varusW1446O3="Ow8xN3dOw8xN22Ow8xN74Ow8x

php - 如何避免 undefined index

如何轻松避免在PHP中收到此错误/通知?Notice:Undefinedindex:testin/var/www/page.phponline21代码:$table='test';$preset=array();method($preset[$table]);数组$preset存在但不具有指定的索引 最佳答案 使用array_key_exists检查它是否存在:$table='test';$preset=array();if(array_key_exists($table,$preset)){method($preset[$tabl

php - 代码点火器 2.1.3 : sess_destroy() causes Undefined index: session_id etc notice when 'sess_use_database' == TRUE

我一直在使用数据库测试codeigniter的session功能,每当我注销(使用sess_destroy())时,我都会收到以下通知:APHPErrorwasencounteredSeverity:NoticeMessage:Undefinedindex:session_idFilename:libraries/Session.phpLineNumber:272APHPErrorwasencounteredSeverity:NoticeMessage:Undefinedindex:ip_addressFilename:libraries/Session.phpLineNumber:2

PHP 5.6 : ArrayAccess: Function isset calls offsetGet and causes undefined index notice

我编写了实现ArrayAccess接口(interface)的简单PHP类:classMyArrayimplementsArrayAccess{public$value;publicfunction__construct($value=null){$this->value=$value;}publicfunction&offsetGet($offset){var_dump(__METHOD__);if(!isset($this->value[$offset])){thrownewException('Undefinedindex:'.$offset);}return$this->val

php - 注意: undefined offset :在第641行的/my/Zend/ib/Search/Lucene/Index/SegmentInfo.php中

我在使用zendsearch-lucene框架编制索引时遇到问题。我们的文件存储库有大约25000个文件,我正试图为它们建立索引。但在批索引过程中,出现了以下错误:Notice:Undefinedoffset:2047in/my/Zend/lib/Search/Lucene/Index/SegmentInfo.phponline641Notice:Tryingtogetpropertyofnon-objectin/my/Zend/lib/Search/Lucene/Index/SegmentMerger.phponline202Fatalerror:Uncaughtexception'

php - Laravel 5 nginx domain.com/index.php 和 domain.com/both 工作。如何重定向/index.php?

在raspberrypi2上安装了nginx和php5.6。工作出色,但我的页面仍然从xyz.com/index.php/whatever(错误)以及xyz.com/whatever(完美)加载。我不希望/index.php加载我的主页。我希望它重定向到/没有index.php。这也适用于所有子文件夹。我究竟做错了什么??这是我构建的第一台服务器,因此我们将不胜感激。谢谢。站点可用配置:server{root/data/something.com/www/something/public;indexindex.phpindex.htmlindex.htm;server_namesome

php - htaccess,授权使用 index.php 但允许一些文件夹没有任何授权

我第一次在这里发东西,通常我会找到我需要的东西,我希望你能帮助我,也许它也会帮助其他人。我有一个手工制作的mvc(只有php/html/js/bootstrap),我需要限制一些访问但允许其他访问,我尝试了一些答案但似乎对我的情况没有任何作用。这是我的目录结构:Directorystructure所以这是我的问题,我希望人们授权以允许访问index.php和所有目录。这部分很好,很容易设置。但我还需要允许他们在没有任何授权的情况下访问3个文件夹(“/datas”、“/datasProd”和“/jeux”)。我试图在我写这篇文章的那些文件夹中添加一些htaccess以允许所有人:Orde