imagesx() 函式


imagesx() 函式獲取影像的寬度。它返回影像的寬度,或在出現錯誤時返回 FALSE。

語法

imagesx(img)

引數

  • img:使用 imagecreatetruecolor() 建立的影像資源

返回值

imagesx() 函式返回影像的寬度,或在出現錯誤時返回 FALSE。

示例

以下是一個示例

 即時演示

<?php
   $img = imagecreatetruecolor(450, 250);
   echo imagesx($img);
?>

輸出

以下為輸出

450

更新於:31-12-2019

235 次瀏覽

開啟你的職業生涯

透過完成課程獲得認證

開始學習
廣告
© . All rights reserved.