copyrenzhe / novel Goto Github PK
View Code? Open in Web Editor NEW基于 Laravel 5.2 的小说网站
Home Page: http://www.shu000.com
基于 Laravel 5.2 的小说网站
Home Page: http://www.shu000.com
哥们,有文档没有,装好了不知道咋用,谢谢了。
初始化的时候就显示
ErrorException in Kanshuzhong.php line 65: file_put_contents(/www/wwwroot/novel.learningman.top/public/cover/2_cover.jpg): failed to open stream: No such file or directory
ErrorException in CommonController.php line 21:
Use of undefined constant inf - assumed 'inf' (this will throw an Error in a future version of PHP)
提示未定义常量?
CommonController 控制器方法
namespace App\Http\Controllers;
use App\Models\Novel;
use App\Http\Requests;
use Cache;
class CommonController extends Controller
{
//
protected $genres;
/**
* CommonController constructor.
*/
public function __construct()
{
$hotNovels = [];
$hotNovels['total'] = \Redis::zRevRangeByScore(config('cache.redis.view_total'), -inf, +inf,
['withscores' => true, 'limit' => [0, 8]]);
$hotNovels['month'] = \Redis::zRevRangeByScore(config('cache.redis.view_month'), -inf, +inf,
['withscores' => true, 'limit' => [0, 8]]);
$hotNovels['week'] = \Redis::zRevRangeByScore(config('cache.redis.view_week'), -inf, +inf,
['withscores' => true, 'limit' => [0, 8]]);
$genres = \Cache::rememberForever('genres', function() {
return category_maps();
});
$this->genres = $genres;
view()->composer(['common.right', 'common.navbar'], function($view) use($hotNovels, $genres) {
$view->with('hotNovels', $hotNovels)->with('genres', $genres);
});
}
}
这个是因为我没有安装redis 的服务吗?
老铁你这项目挺好的,我就随手一点击这个网站,打不开
想看看长啥样
我是在PHP7.2下运行的;
第一个;redis方法使用问题;
\App\Http\Controllers\CommonController的Redis的facade要改成use Illuminate\Support\Facades\Redis;
不要使用之前的use Redis;
第二个;php7.2之后count()方法严格模式的问题;
在\Illuminate\Foundation\Bootstrap\HandleExceptions里,修改handlerError()方法;
public function handleError($level, $message, $file = '', $line = 0, $context = [])
{
if (error_reporting() & $level) {
if (strpos($message, 'Parameter must be an array or an object that implements Countable') !== false)
return;
throw new ErrorException($message, 0, $level, $file, $line);
}
}
第三个,npm install报错“dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib”;需要升级一下对应的包;
brew uninstall --ignore-dependencies node icu4c
brew install node
或者直接升级对应的包;brew upgrade node
之后再执行gulp,可能会执行失败,有几个npm包没安装,安装一下就搞定了;
我部署这个程序有点问题,请问可不可以留个微信或者QQ,想请教你一下,
file_get_contents(/data/wwwroot/yangfan.ren/test/public/build/rev-manifest.json): failed to open stream: No such file or directory (View: /data/wwwroot/yangfan.ren/test/resources/views/app.blade.php) (View: /data/wwwroot/yangfan.ren/test/resources/views/app.blade.php)
没能装上,有点小复杂的样子
系统结构很不错,但不知道数据库设计怎么样,可以共享一下表结构吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.