草庐IT

date_found

全部标签

php - 错误 : No route found for "GET/app/example"

我刚刚使用SymfonyInstaller在我的Windows10笔记本电脑上创建了一个Symfony应用程序.然后,我开始了:phpapp/consoleserver:run然后,我打开了http://localhost:8000/app/example如文档中所述,但我收到以下错误消息:ERROR-UncaughtPHPExceptionSymfony\Component\HttpKernel\Exception\NotFoundHttpException:"Noroutefoundfor"GET/app/example""atC:\Users\JVerstry\morepath\

php - Model.php 行 827 : Class not found 中的 Laravel FatalErrorException

我是Laravel的新手。我曾尝试在我的代码中使用一个示例,但结果出现错误-FatalErrorExceptioninModel.phpline827:ClassCategorynotfound。后来我修改了一行代码,修复了一个错误。但是,我其实不明白错误的原因以及我是如何解决的。这是我的代码(当我尝试使用category构建查询时的结果-我收到错误):belongsTo('Category','category_id');//return$this->belongsTo('App\Category','category_id');}}但是,当我修改一行时,我没有得到上述错误:旧行(错

javascript - 发布 http ://localhost:3000/404 (Not Found)

我正在开发具有上传功能的网络文件浏览器。我正在使用AngularFileUpload指令和angularwebfilebrowser.首先,我下载了文件Web浏览器并对其进行了配置。其次,我下载了文件上传指令并一步一步完成所有操作,我的页面运行完美但是当我尝试上传我得到的东西时FileUploader.js:479POSThttp://localhost:3000/404(NotFound)我知道FileUploader.js找不到upload.php文件,但我把它放到了根文件夹并提供了路径:varuploader=$scope.uploader=newFileUploader({ur

php - Laravel 5.3 - Carbon Date - UTC 偏移获取时区名称

我正在尝试使用Carbon从Laravel5.3中的UTC偏移量获取时区名称。下面列出的代码如有任何帮助,我们将不胜感激。/*currentcodeiteration*/$utcOffset=-5;$timezone=Carbon::now($utcOffset)->timezone->getName();echo$timezone;//Result:-05:00//ExpectedResult:EST/*triedcode*/$timezone=Carbon::now($utcOffset)->tzName;//Result:-05:00/*WhatIusedpriortoCarbo

php - fatal error : Class 'Memcached' not found in/my/path

当我尝试时:$mc=newMemcached();我明白了Fatalerror:Class'Memcached'notfoundin/my/pathphpinfo说/etc/php5/apache2/conf.d/20-memcached.ini作为附加的.ini文件加载。这个文件的内容是这个:;uncommentthenextlinetoenablethemoduleextension=memcached.sodpkg--get-选择|grep内存缓存libmemcached6installmemcachedinstallphp5-memcachedinstall库本图Apache2

PHP strtotime/date_create 错误从 "j M, Y"转换为 "Y-m-d"

我有一个关于strtotime和date_create的错误。在我的代码中,它错误地将日期从“2014年9月7日”转换为“2015-09-07”。注意年份不对!这是我的代码:";$listing_date=date_create($listing_date)->format('Y-m-d');print$listing_date."\n";$listing_date="07Sep,2014";print$listing_date."-->";$listing_date=date('Y-m-d',strtotime($listing_date));print$listing_date."

php - Laravel 5 SQLSTATE[42S02] : Base table or view not found

我正在研究Laravel中的存储库设计模式,我正在使用https://github.com/andersao/l5-repository去做。我想我在我的项目中安装成功了。但是当我使用存储库运行代码时,我遇到了一些问题SQLSTATE[42S02]:Basetableorviewnotfound:1146Table'test.nhanviens'doesn'texist(SQL:select*fromnhanviens)我数据库中的表是Nhanvien而不是Nhanviens在我的代码中NhanvienRepository.phpNhanvienRepositoryEloquent.p

php - Zend_Date : How to get the date of an upcoming day?

我想获得最近的星期一的日期(即不是过去的)。因此,如果今天是星期二(2009年12月1日),我想获取星期一(2009年12月7日)的日期。我如何用Zend_Date做到这一点?解决方案:假设今天是星期二,我们想要获得即将到来的星期一。星期一是future6天。因此,我们将添加6天以获得星期一的日期。//likeso:$tuesday=Zend_Date::now();$nextMonday=$tuesday->addDay(6);要动态地执行此操作,我们需要确定今天是星期几:$today=Zend_Date::now();$dayNumber=$today->get(Zend_Date

php - date() 和 strtotime 的问题

这是我的:$str='12-25-2009';echodate('Y-m-d',strtotime($str));这会产生1969-12-31而不是2009-12-25。如果我将$strvar设置为01-01-2009,我将得到正确的2009-01-01。为什么会这样? 最佳答案 试试$str='25-12-2009';或$str='12/25/2009';如果日期格式是日月年使用破折号(-)否则如果格式是月日年使用斜杠(/) 关于php-date()和strtotime的问题,我们在S

php - 请求。错误 : Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET/"

我已经安装了Symfony2,修复了文件权限后,我可以通过将浏览器指向以下地址来访问开发环境:http://localhost/app_dev.php但是,当我尝试通过将浏览器指向http://localhost来访问生产环境时,出现以下异常(来自app/logs/prod.log):[2012-08-1311:30:03]request.ERROR:Symfony\Component\HttpKernel\Exception\NotFoundHttpException:Noroutefoundfor"GET/"(uncaughtexception)at/path/to/framewo