This is a discussion on rename() with a hash (or pound) in the filename within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, Running PHP4 on Win32, can't seem to rename files with a '#' (there are some other char's that ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
Running PHP4 on Win32, can't seem to rename files with a '#' (there are some other char's that I think I have a problem with as well, such as '!' but have not confirmed) I really don't know where to start looking to even try and debug this - all I get is a false return from rename() - (copy also fails). TIA, Troy |
|
|||
|
On 28 Feb 2004 04:03:13 -0800, google@f0rge.ws (Troy) wrote:
>Running PHP4 on Win32, can't seem to rename files with a '#' (there >are some other char's that I think I have a problem with as well, such >as '!' but have not confirmed) > >I really don't know where to start looking to even try and debug this >- all I get is a false return from rename() - (copy also fails). Works for me, Win2k+PHP4.3.3. <pre> <?php var_dump(is_file('test')); var_dump(is_file('test#')); echo "\n"; var_dump(rename('test', 'test#')); var_dump(is_file('test')); var_dump(is_file('test#')); echo "\n"; var_dump(rename('test#', 'test')); var_dump(is_file('test')); var_dump(is_file('test#')); ?> </pre> Outputs: bool(true) bool(false) bool(true) bool(false) bool(true) bool(true) bool(true) bool(false) Platform (more specifically than win32?)? PHP version? Filesystem type? Do you have error_reporting set to E_ALL, and display_errors on, so you can see the warnings? (Or look in your error log). -- Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool <http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space> |
|
|||
|
"Troy" <google@f0rge.ws> wrote in message news:f391dfeb.0402280403.2ef11587@posting.google.c om... > Running PHP4 on Win32, can't seem to rename files with a '#' (there > are some other char's that I think I have a problem with as well, such > as '!' but have not confirmed) > > I really don't know where to start looking to even try and debug this > - all I get is a false return from rename() - (copy also fails). > Check if the files you are trying to renamed aren't temporary files which are used by the OS or an application by renaming them manually. JW |
![]() |
| Thread Tools | |
| Display Modes | |
|
|