How to Create a Temp Directory for PHP

The PHP Web scripting language makes use of temporary directories to store files and folders that are uploaded from a user. These could be files that are compressed to be sent to a user on a website or an archive or directory that is extracted and inspected in your code. This "temp" directory is defined in your "PHP.INI" file.

Instructions

    • 1

      Click "Start" and type "notepad" in the search field. Click "Notepad" from the list of results.

    • 2

      Click "File," then "Open."

    • 3

      Type "%windir%\php.ini" in the "file" text box to open your PHP.ini file. The Windows directory is the default location for this file, but change the path to it if you have a non-standard installation.

    • 4

      Type "upload_tmp_dir = <path>" in the bottom of the document window, without quotation marks.

    • 5

      Replace "<path>" with the quoted path of the temporary directory you will create, such as "C:\Temp."

    • 6

      Click "File," then "Save."

    • 7

      Open the Start Menu and click "Computer." Double-click the drive to hold your temporary files and navigate to where the new temporary directory will be created.

    • 8

      Right-click the current folder, then click "New," then "Folder."

    • 9

      Type the name of the folder you specified in "php.ini" and press "Enter."

    • 10

      Restart your Web server to apply the new changes.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured