我正在尝试用 php 实现:
if ($image starts with "photos/") {
echo "the image path starts with photos/";
}
最佳答案
if (substr($image, 0, 7) == 'photos/')
关于php - 如何创建 "if"语句来评估 PHP 中的前 7 个字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8366340/