Tag: PHP

How To Install PHP 7.4 and Set Up on Ubuntu 20.04

Introduction PHP is a popular server scripting language known for creating dynamic and interactive web pages. Getting up and running with your language of choice is the first step in learning to program. This tutorial will guide you through installing PHP 7.4 on Ubuntu and setting up a local programming environment via the command line. […]

Google Chrome headless mode and open source project

💻 Google Chrome headless mode. php 的爬虫方式是使用curl库函数去抓去静态界面抓取,所以正则匹配的时候不是整个渲染的界面,而现在的网页中,有很多的数据以及界面采用的是二次加载,前端的界面也越来越复杂,为了更好的解决这个问题,大牛们提出了不同的解决方案: 注意⚠️ google的浏览器的指定版本,已经开始支持了Chrome Headless ,这导致了一些第三方的工具不去再去维护他们的项目。 1. phantomjs (已经停止开发维护) 👉 https://phantomjs.org/ Important: PhantomJS development is suspended until further notice (more details). PhantomJS is a headless web browser scriptable with JavaScript. It runs on Windows, macOS, Linux, and FreeBSD. Using QtWebKit as the back-end, it offers fast and native support for various web […]

PHP Development Note.

文章中紀錄在使用PHP項目開發中遇到的錯誤問題,但是這些問題在開發中經常碰到的日常問題,沒有必要老是去看文檔之類的解決問題,所以都總結到改文檔 Error Message 1: 解決方案: 查看該socket套接字的權限: 發現權限是: 查看php-fpm的配置文件,由於使用的php-fpm 的pool管理,所以要查看pool.d中的配置如下: Error Message 2: 今日在安裝部署PHP8.1-FPM的時候,nginx配置沒有問題,但是頻繁出現FILE NOT FOUND的提示。 nginx的日誌提示: 解決方案是修改PHP-FPM的配置: 修改為: 其中ubuntu 是當前登錄的Ubuntu系統的子用戶。 修改之後重啟php8.1-fpm問題就解決了。