Command Line PHP
sudo update-alternatives --config php
Select php8.0 from the list with the available options:
Command Line PHP
sudo update-alternatives --config php
Select php8.0 from the list with the available options:
โดยใช้คำสั่ง
sudo update-alternatives --set php /usr/bin/php7.3
และลองเช็คดูว่าเปลี่ยน php เวอร์ชั่นหรือเปล่า โดยใช้คำสั่ง
php -v
การเปลี่ยน php เวอร์ชั่น ใช้ตอนที่เรามีปัญหากับการใช้ drush ไม่ได้ และ composer
Update แบบ fix field นั้นๆ ว่าจะเป็นค่าอะไร
function urlSafeString($str) {
$str = strtolower(str_replace(array(' ', ' '), '-', preg_replace('/[^a-zA-Z0-9 s]/', '', trim($str))));
return $str;
}