Apache サーバーでアップロード フォームと PHP ファイルを有効にするにはどうすればよいでしょうか?

Apache サーバーでアップロード フォームと PHP ファイルを有効にするにはどうすればよいでしょうか?

curl を使用して http 経由で Apache サーバーにファイルをアップロードしようとしています。

私のサーバーのルート ディレクトリには単純な upload.php ファイルがあり、また、単純なアップロード フォームである「送信」ページもサーバー上にあります。

ファイルをサーバーにアップロードできるように、2 つをリンクして連携させるにはどうすればよいですか? または、.php ファイルだけでファイルをサーバーにアップロードできますか?

-v を付けて curl コマンドを実行すると、次の出力が得られます。

root@glennvds-VirtualBox:/home/glennvds# curl -F 
‘data=@~/home/glennvds/Desktop/link.txt’ http://xx.xx.xx.xx/upload.php -v
Warning: setting file ~/home/glennvds/Desktop/link.txt’  failed!
*   Trying xx.xx.xx.xx...
* TCP_NODELAY set
* Connected to xx.xx.xx.xx (xx.xx.xx.xx) port 80 (#0)
POST /upload.php HTTP/1.1
Host: xx.xx.xx.xx
User-Agent: curl/7.58.0
Accept: /
Transfer-Encoding: chunked
Content-Type: multipart/form-data; boundary=------------------------ 
f226a51eab6734da
Expect: 100-continue


< HTTP/1.1 100 Continue
* read function returned funny value
* stopped the pause stream!
* Closing connection 0
curl: (26) read function returned funny value

関連情報