Skip to content

Commit 08dfd38

Browse files
authored
Add files via upload
1 parent 03b05da commit 08dfd38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This should be the second argument of the function. It specifies the folder you
4242
> If not specified the script will attempt to upload the file to the `current-working-directory`.
4343
4444
## Successful Upload
45-
Upon successfull upload of the file, this function returns name of the file with it's extension appended to it, example `uploaded-document.pdf`. Note in the code snippet below, the `$fileName` will have name of the uploaded file. You can further-use this filename in your code, for-instance saving it to the database etc :point_down:
45+
Upon successfull upload of the file, this function returns name of the file with it's extension appended to it, example `uploaded-document.pdf`. Note in the code snippet below, the `$fileName` will have name of the uploaded file. You can further-use this filename in your code, for-instance saving it to the database, etc :point_down:
4646
```
4747
$file = $_FILES["html_file_input"];
4848
@@ -51,7 +51,7 @@ $fileName = upload ($file);
5151
```
5252

5353
## Unsuccessful Upload
54-
If upload was not successful, the function will return an empty string `""`. Note in the code snippet below, the `$fileName` will have an empty string stored in it. You can proceed with the execution of your code depending on this value, example prompting users that file upload failed :point_down:
54+
If upload was not successful, the function will return an empty string `""`. Note in the code snippet below, the `$fileName` will have an empty string stored in it. You can proceed with the execution of your code depending on this value, for-instance prompting users that file upload failed, :point_down:
5555
```
5656
// The upload() function expects `a file as the first argument`
5757
// Since we are calling the function with a string as the first argument

0 commit comments

Comments
 (0)