Page 1 of 1

file functions with php are not working anymore

PostPosted: 11. November 2007 01:04
by kjarli
Functions as readdir-opendir-scandir-is_dir() all return an error that the designated folder does not exist

trying to create one with mkir results an error saying it already exists...

file_put_contents doesnt give an error with:

if(!file_put_contents($file, $output))
{
die('error');
}

but doesnt create the page either...

what to do??

PostPosted: 11. November 2007 01:16
by Wiedmann
Functions as readdir-opendir-scandir-is_dir() all return an error that the designated folder does not exist

- original error message?
- example script?

Code: Select all
if (!file_put_contents($file, $output)) {
    die('error');
}

but doesnt create the page either...

Not at the location you expect it... What's the value of "$file"?

PostPosted: 11. November 2007 16:44
by kjarli
Code: Select all
<?php

echo $debug_file;
if(!file_put_contents($debug_file, $output))
{
   die('The file <strong>' . $debug_file . '</strong> could not be created');
}
mkdir('folder');
scandir('folder');
$open_ = opendir('folder');
echo readdir($open_);

?>



will result
default_result.php
Warning: mkdir() [function.mkdir]: File exists in C:\xampp\htdocs\error_class\debug_console.php on line 382
.


edit:

Im reinstalling because i think the patcher did not work propperly..
it said uninstalling 1.6.3a while i just updated to 1.6.4

PostPosted: 11. November 2007 17:27
by Wiedmann
Warning: mkdir() [function.mkdir]: File exists in C:\xampp\htdocs\error_class\debug_console.php on line 382

a) This can't be from the example script.
--> Your example script have no line 382

b) This error message is clear enough:
--> you can't make a directory with the name "folder", if a directory or file with this name allready exists.

PostPosted: 11. November 2007 17:44
by kjarli
its a part of my script...

Im trying to get xampp 1.6.4 reinstalled to work, copied htdocs/mysql/phpmyadmin and now i cant get the mysql to start :S