Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从 url 中给出的大小更改显示图像大小基数?
www.example.com/photo/90x90/equation.jpg
equation.jpg 的大小应该是 90x90 ,如果我更改 90x90 的值,它将调整图像的大小。
$str = "www.example.com/photo/90x90/equation.jpg"; preg_match_all('/(?P<width>\d+)x(?P<height>\d+)/', $str, $matches); print_r($matches);