PHPのrename()関数を使用しファイルの名前を変更してみます。 rename()関数は、ファイルまたはディレクトリの名前を変更することができます。 ■基本的な構文rename(old, new, context)oldは、名前を変更するファイルまたはディレクトリを指定します。 newは、ファイルまたはディレクトリの新しい名前を指定します。 contextは、ファイルハンドル(どのファイルを処理しているかを管理するための名前)のコンテキストを指定します。オプションです。 ■環境・Windows10 ・WampServer Version 3.2.3 64bit ・PHP Version 7.3.21 ■rename()関数を使用しファイルの名前を変更するでは、早速rename()関数を使用しファイルの名前を変更します。 ■コード<html lang="ja"> <head> <titl
![PHPのrename()関数を使用しファイルの名前を変更する](https://cdn-ak-scissors.b.st-hatena.com/image/square/b0e6c97966e87a40b9ffc727d8131acbff631a61/height=288;version=1;width=512/https%3A%2F%2Flaboratory.kazuuu.net%2Fwp-content%2Fuploads%2F2021%2F07%2FL.png)