草庐IT

check_ins

全部标签

PHP , htaccess : apply page title in URL

我想在URL中应用页面HTML标题例如在这里(stackoverflow)的url是这样的:http://stackoverflow.com/questions/10000000/get-the-title-of-a-page-url您可以看到“get-the-title-of-a-page-url”部分,即页面标题我的意思是当用户访问spowpost.php?post=1页面加载时显示的实际url将是spowpost.php?post=1$title=..the_title..我该怎么做?编辑:我在考虑htaccess,但我不太了解这一点,所以教程会帮助解决这个问题..

wordpress - 错误 : Only variable references should be returned by reference in wp-includes/post.

当我在WordPress设置中启用PHP错误报告时,我不断收到此错误。注意:在3394行的/Users/admin/Sites/wp-includes/post.php中,只应通过引用返回变量引用我觉得它与分类法及其层次设置有关。现在在我正在编写的插件中一直试图追踪它。这些是WPCore中的实际代码行,返回在准确的行上。//Makesuretheposttypeishierarchical$hierarchical_post_types=get_post_types(array('hierarchical'=>true));if(!in_array($post_type,$hierar

PHP PDO : Charset=UTF8 : An invalid keyword charset was specified in the dsn string

我正在使用sqlsrv驱动程序连接到带有PDO的MSSQL服务器。PHP版本为5.3.24。工作连接如下所示:$dsny="sqlsrv:Server=xx1;Database=xx2";$usery='xx3';$passwordy='xx4';$dbhy=newPDO($dsny,$usery,$passwordy);**但是我需要设置字符,然后我试试这个:$dsny="sqlsrv:Server=xx1;Database=xx2;charset=utf8";$usery='xx3';$passwordy='xx4';$dbhy=newPDO($dsny,$usery,$passw

PHPExcel : Data validation not working in . xls 格式

我有一个包含两个工作表的excel文件:工作表;列表-将作为列表项显示在Worksheet工作表中的项目列表。请看下面的图片:我想使用PHPExcel库生成它。我已经尝试但没有得到预期的结果。请参阅我的以下代码:$objPHPExcel=newPHPExcel();//Setdocumentproperties$objPHPExcel->getProperties()->setCreator("SoumyaBiswas")->setLastModifiedBy("SoumyaBiswas")->setTitle("Office2007XLSXTestDocument")->setSub

php - 找不到路径 "/login_check"的 Controller - symfony2

我知道这是一个常见问题。并且已经发布了关于这个主题的几个问题。我已经尝试了这些问题中推荐的所有解决方案,但没有一个奏效。我发现如果我将form_login置于firewall之后,就会出现此问题。但是我在防火墙中没有任何额外的层,所以路径应该很简单,如文档中所述。我的security.yml#app/config/security.ymlsecurity:encoders:Joy\JoyBundle\Entity\User:algorithm:sha512encode_as_base64:trueiterations:1role_hierarchy:ROLE_ADMIN:ROLE_US

php - 可捕获的 fatal error : Object of class PDOStatement could not be converted to string in line 114

这个问题在这里已经有了答案:returnonevaluefromdatabasewithmysqlphppdo(3个答案)关闭23天前。我正在尝试向我的数据库中添加一些数据,但我在第114行的/var/www/mandje.php中收到错误Catchablefatalerror:ObjectofclassPDOStatementcouldnotbeconvertedtostringin/var/www/mandje.php。这是我正在使用的代码:foreach($_SESSION["cart"]as$id=>$value){$query=$db->query('SELECT*FROMP

php - Laravel 的 Auth::attempt() 返回 true 但 Auth::check() 返回 false

如标题所示,Laravel的函数Auth::attempt()返回true如下代码部分(删除了不重要的部分):publicfunctiondoLogin(){$validator=[..]if($validator->fails()){[..]}else{$userdata=array('username'=>Input::get('username'),'password'=>Input::get('password'));if(Auth::attempt($userdata,true)){returnRedirect::to('/');}else{returnRedirect::t

nginx - 错误 28105#0 : *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

我无法使用php-fpm正确配置Nginx。当我得到任何php脚本时,我在浏览器中收到Nginx404Notfound错误:Filenotfound.在我的php-fpm日志中我得到:172.17.42.1-28/Apr/2015:09:15:15+0000"GET/index.php"404对于任何php脚本调用和Nginx日志,我得到:[error]28105#0:*1FastCGIsentinstderr:"Primaryscriptunknown"whilereadingresponseheaderfromupstream,client:127.0.0.1,server:loc

php - bolt : fetch imageinfo for items in imagelist

我是Bolt的新手,我正在尝试获取记录图像列表中图像的原始宽度。'image'的变量只包括文件名、标题、id、顺序和文件,所以image.width|image什么都不做。我宁愿不使用thumbnail(width,height)方法,除非我可以用它访问图像的完整尺寸,而不是裁剪后的版本。https://docs.bolt.cm/record-and-records#imagelisthttps://docs.bolt.cm/templatetags#imageinfo有没有办法在imagelist循环中使用imageinfo()来获取宽度和高度,或者有更好的方法吗?感谢您的帮助!{%

php - Gmail API : Get list of messages labelled with a specific label in php

情况我正在设置GmailAPI对于我的应用程序。我需要导入所有标有特定标签的电子邮件,例如TRASH、SPAM、SENT、UNREAD、STARRED等。我能够获取收件箱电子邮件列表和单条消息信息。我可以获得标签列表以及单个标签信息。但我没有找到如何将它们结合起来。显然,在给定labelId的情况下,没有检索消息列表的特定请求,并且在电子邮件列表中没有labelId的踪迹。请求输出:获取消息列表:array(3){[0]=>array(5){["messageId"]=>string(16)"14ddc24465a9b72e"["messageSnippet"]=>string(14)