{
parent::initialize();
$this->photoService = new PhotoService();
}
public function index($id)
{
$chapter = Chapter::with('book')->cache('chapter:' . $id, 600, 'redis')->find($id);
if (empty($chapter->book->cover_url)) {
$chapter->book->cover_url = $this->img_site.'/static/upload/book/'.$chapter->book_id.'/cover.jpg';
}
$flag = true;
if ($chapter->book->start_pay >= 0) {
if ($chapter->chapter_order >= $chapter->book->start_pay) { //如果本章序大于起始付费章节,则是付费章节
$flag = false;
}
} else { //如果是倒序付费设置
$abs = abs($chapter->book->start_pay) - 1; //取得倒序的绝对值,比如-2,则是倒数第2章开始付费
$max_chapter_order = cache('maxChapterOrder:' . $chapter->book_id);
USER | hhggm |
HOME | /home/hhggm |
HTTP_X_VARNISH | 40374729 |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_GRACE | none |
HTTP_X_FORWARDED_FOR | 54.226.210.133, 172.71.222.32, 127.0.0.1 |
HTTP_CF_IPCOUNTRY | US |
HTTP_CDN_LOOP | cloudflare |
HTTP_CF_CONNECTING_IP | 54.226.210.133 |
HTTP_REFERER | http://shudm.com/chapter/567814 |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_CF_VISITOR | {"scheme":"https"} |
HTTP_X_FORWARDED_PROTO | https |
HTTP_CF_RAY | 86bf87efe8612018-IAD |
HTTP_X_REAL_IP | 172.71.222.32 |
HTTP_X_FORWARDED_HOST | llmmh.com |
HTTP_HOST | llmmh.com |
PHP_VALUE | error_log=/home/hhggm/logs/php/error.log; memory_limit=1G; max_execution_time=60; max_input_time=60; max_input_vars=10000; post_max_size=64M; upload_max_filesize=64M; auto_prepend_file=/home/hhggm/.varnish-cache/controller.php; date.timezone=UTC; display_errors=off; |
HTTPS | on |
MGT | 1 |
GEOIP_LONGITUDE | |
GEOIP_LATITUDE | |
GEOIP_CITY_CONTINENT_CODE | |
GEOIP_POSTAL_CODE | |
GEOIP_CITY | |
GEOIP_REGION | |
GEOIP_CITY_COUNTRY_NAME | |
GEOIP_CITY_COUNTRY_CODE3 | |
GEOIP_CITY_COUNTRY_CODE | |
GEOIP_COUNTRY_NAME | United States |
GEOIP_COUNTRY_CODE3 | USA |
GEOIP_COUNTRY_CODE | US |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.hhggm.com |
SERVER_PORT | 443 |
SERVER_ADDR | 127.0.0.1 |
REMOTE_PORT | |
REMOTE_ADDR | 172.71.222.32 |
SERVER_SOFTWARE | nginx/1.21.4 |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /home/hhggm/htdocs/www.hhggm.com/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /index.php?s=//chapter/567814 |
SCRIPT_NAME | /index.php |
SCRIPT_FILENAME | /home/hhggm/htdocs/www.hhggm.com/public/index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//chapter/567814 |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711859.3205 |
REQUEST_TIME | 1711711859 |
VARNISH_DEVELOPER_MODE | false |
VARNISH_GENERIC_CONTROLLER_VERSION | 0.0.1 |
BOOKCTRL | book |
CHAPTERCTRL | chapter |
TAGCTRL | tag |
BOOKLISTACT | booklist |
SEARCHCTRL | search |
RANKCTRL | rank |
UPDATEACT | update |
AUTHORCTRL | author |
spider_db_conn | xxx |