php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50453 Relative path
Submitted: 2009-12-11 18:13 UTC Modified: 2010-01-06 08:37 UTC
Votes:3
Avg. Score:2.3 ± 0.9
Reproduced:2 of 3 (66.7%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: prof3ta at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: prof3ta at gmail dot com
New email:
PHP Version: OS:

 

 [2009-12-11 18:13 UTC] prof3ta at gmail dot com
Description:
------------
In the sample code, the path for the upload dir should be a relative one, not an absolute one.

Reproduce code:
---------------
---
From manual page: function.move-uploaded-file#Examples
---



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-11 20:05 UTC] bjori@php.net
Why?
 [2009-12-11 22:23 UTC] prof3ta at gmail dot com
Sorry if I have been cryptic, but I was running out of time.

The target path in the move_uploaded_file function is referred in the whole doc page as a mere "path", without specifying if a relative or absolute path should be used for it. Both are obviously possible.

In the example code, an absolute path is used. It should be clarified IN CAPITAL LETTERS that the absolute path is relative to the whole file system and *not* to the webroot (as one could erroneously expect).

This is not a proper bug, I'm just advising to be more explicit in the function doc page.

Hope this helps.
 [2010-01-06 08:37 UTC] bjori@php.net
We shouldn't need to treat our users as sillibillies by screaming 
obvious thing at them.

This is explained, among other places, in the filesystem docs.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 08:00:01 2026 UTC