![](/img/trans.png)
[英]How to install PHP 7.4 on Apple M1?
我有一個 Apple M1 arm64 我嘗試通過 brew 安裝 PHP 7.4 然后我嘗試代客泊車 有任何想法嗎? ...
[英]How to install PHP 7.4 on Apple M1?
我有一個 Apple M1 arm64 我嘗試通過 brew 安裝 PHP 7.4 然后我嘗試代客泊車 有任何想法嗎? ...
[英]change PHP compatibility from 7.4 to 8.0
我有一個 php 腳本,需要使此代碼行與 php8.0 兼容:if ((is_array($key) && is_array($value)) || (strlen($key) > 0 && strlen($value) > 0)) { 我不是程序員/ ...
[英]How to create CakePHP project (previous version) using Composer (using an old version of PHP, in 2023)
TL;DR 技術在不斷發展,被棄用的現在已經過時了。 不過不用怕,這里Docker來解決問題。 請參閱下面的答案,了解我如何在 macOS Ventura 上創建 CakePHP 3.6 項目。 在這里,在 2023 年,我將我的 Mac 更新到 Ventura (13.0.1),並安裝了 br ...
[英]Trying to access array offset on value in PHP 7.4
我剛剛將服務器的 PHP 版本升級到 PHP 7.4.1,現在出現此錯誤:注意:嘗試訪問 bool 類型值的數組偏移量 PHP 7.4 的修復是什么? ...
[英]strtotime miscalculates date when adding days that cross year
我需要在日期中添加天數。 我一直很高興地使用以下內容,並且一直使用到年底:date('o-m-d', strtotime("{$start_date} +6 days")); 例如,當 $start_date 等於 2022-12-19 時,結果為 2022-12-25:date('o-m-d', ...
[英]Install Xdebug for PHP 7.4 on M1 Apple
我想用 M1 在我的 Mac 上安裝 Xdebug。 由於我參加的項目,我使用 PHP 7.4.32。 我無法切換 PHP 版本。 當我嘗試安裝 Xdebug 時,它說我的 PHP 版本必須更新到 8.0.0,但我仍然想使用 7.4.32。 當前的 PHP 版本是用 homewbrew 安裝的。 ...
[英]: Invalid argument supplied for foreach() in
在兩個不同的 WordPress 站點上嘗試了此代碼。 它在第一個站點上工作。 在我將模板完全移動到我的新站點后,我收到了這個錯誤:Invalid argument supplied for foreach() in 我不知道是什么原因,雖然它是相同的模板,插件和一切 ...
[英]How to compile PHP 7.4.33 correctly with OpenSSL 1.1.1 on Ubuntu 22.04
Ubuntu 22.04 包括 OpenSSL 3,它與 PHP 7.4.33 不兼容。 使用 SSL 支持在 Ubuntu 22.04 上的自定義路徑中從源代碼構建 PHP 7.4.33 在 PHP 中使用 SSL 功能時導致SSL operation failed錯誤file_get_con ...
[英]Why PHP7 is faster than PHP8 in reading CSV file?
我做了一些簡單的測試:讀取 csv 文件,其中 100 000 行(10 列)由隨機英文單詞填充。 腳本打開文件,並將每一行放入一個數組變量。 ab -n 100 -l http://localhost:8000 我通過 Apache Benchmark 命令發送了 100 個請求來測量 PHP8 ...
[英]PDO Library not detected (classes not found) PHP
我正在做我自己的網站,我在這里使用 PDO 庫。 我有一些圖書館工作正常但這個圖書館出於任何原因無法“檢測到” 文件夾中的文件: 使用 composer 安裝 lib => /main/assets/ 我想在其中使用 lib 的文件 => /main/user/index.php 庫路 ...
[英]How to fix undefined offset: 1
我該如何解決這個問題(未定義的偏移量:第 30 行的 1): 我想升級到 php8 但在 php 7,4 中得到這個(php8 顯示略有不同的輸出) ...
[英]how to install multiple phpmyadmin in ubuntu?
我在我的 ubuntu 系統中使用 php7.4,現在我必須安裝php8.1和php7.4 php8.1安裝成功,但是php8.1怎么安裝PHPMyAdmin呢? 或者我不需要兩個PHPMyAdmin用於不同的 PHP 版本嗎? 請就此告訴我。 提前謝謝你。 我已經按照下面的答案更新了,對嗎? ...
[英]Insert multiple data into different tables in a single transaction
這與框架無關,因為它是一個外部項目,我目前正在開發以學習有關數據庫管理或數據庫行為方式的一些知識...... 我需要一些 php 和 PDO 的幫助......之前我開發了這個腳本:<?php class DataBaseManager { public function GetDa ...
[英]mb_ereg_search_regs different behaviour with b option switching from php 7.4.7 to php 7.4.8
我有這樣的代碼:$sTestString = "BEGIN:VEVENT"; $sPattern = '^(BEGIN|END)\:(.+)$'; $sRegex_opt = 'mib'; mb_ereg_search_init( $sTestString ); print_r(mb_ereg_s ...
[英]Refactor htaccess to meet friendly url goal
我的網址看起來像這樣($_GET): http://localhost/index.php?search=param&other1=param1&other2=param2&other3=param3&other4=param4 基於SPA結構: 其中 search ...
[英]How do I print an array value as a template tag as blank in shorthand, even if it's null?
這個賞金已經結束了。 此問題的答案有資格獲得+50聲望賞金。 賞金寬限期在17 小時后結束。 desbest正在尋找這個問題的更詳細的答案: 閱讀我對鏈接到 3v4l.org 的其他人的回答的評論如果我的主 php 文件中有這個(例如我的控制器) 這在我的模板文件(例如我的視圖文件)中,我可以在 ...
[英]DateTime::createFromFormat fails randomly
我使用以下腳本來測試我的 Yii2 項目之一失敗的內容: 以下是一些背靠背運行的結果: 服務器(CentOS Linux release 7.9.2009 (Core))具有以下 PHP 版本: 為什么DateTime::createFromFormat在某些情況下會失敗,而在其他情況下卻可以正常工 ...
[英]ereg_replace to preg_replace trouble
您好,我正在將我的網站使用的腳本從 php 5.4 升級到 php 7.4,我遇到了一些問題:我需要將它從 ereg_replace 切換到 preg_replace 但由於某種原因它無法按預期方式工作。 這是下面 function 中的原始 ereg_replace 用法: } 如果我只是替換$ ...
[英]1045-Access denied for user 'root'@'localhost' (using password: NO) (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')
我正在使用 laravel 7,在克隆我現有的 repo 之后,它是通過 windows 操作系統創建的,現在我正在使用 macOS。 克隆后,我復制了 env.example 並轉換為 .env 文件,然后運行以下命令, composer install npm install &&am ...
[英]Apache2 2.4 not executing PHP 7.4 code, module not showing up
我有 Apache2 在 Debian 11 盒(x64)上運行。 It was installed with an Openmediavault ISO, with nginx and PHP 7.4 installed already (for the web UI) I try to ins ...