sorry maar hij wil me text + code niet versturen probeer het ff in delen aub dit topic niet sluiten
preview wil hij ook niet doen
ik zal mijn text ff in een txt bestandje zetten en de link posten
hij wou ook niet eens een txt bestand uploaden er zit waarschijnlijk iets fout maar het zou zo moeten werken
sorry voor het ongemak
thanx bthy
het versturen vanaf me server doet hij wel goed er zit waarschijnlijk iets niet goed met me pc
hieronder norgmaals de vraag alvast bedankt
Na hier op got een functie te hebben gevonden om dirs te kopieeren heb ik deze helemaal uitgezocht en daarna ben ik hem een beetje gaan verbouwen zodat ik de datums van mappen en bestanden uit een map kan vergelijken met 1 datum. Als de datum van het bestand of map later is dan de opgegeven datum dan echot ie hem en zou hem in een array moeten zetten. Dat in die array zetten die ie dus niet.
En heb echt geen id waarom niet aangezien hij hem wel echot.
Hieronder de source:
ik heb ook al geprobeerd $updated[] = $filenames; ivp array_push($updated,$filenames);
maar dit geeft het zelfde resultaat.
hier een voorbeeld van de output:
preview wil hij ook niet doen
ik zal mijn text ff in een txt bestandje zetten en de link posten
hij wou ook niet eens een txt bestand uploaden er zit waarschijnlijk iets fout maar het zou zo moeten werken
sorry voor het ongemak
thanx bthy
het versturen vanaf me server doet hij wel goed er zit waarschijnlijk iets niet goed met me pc
hieronder norgmaals de vraag alvast bedankt
Na hier op got een functie te hebben gevonden om dirs te kopieeren heb ik deze helemaal uitgezocht en daarna ben ik hem een beetje gaan verbouwen zodat ik de datums van mappen en bestanden uit een map kan vergelijken met 1 datum. Als de datum van het bestand of map later is dan de opgegeven datum dan echot ie hem en zou hem in een array moeten zetten. Dat in die array zetten die ie dus niet.
En heb echt geen id waarom niet aangezien hij hem wel echot.
Hieronder de source:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
| <?php function rcopy($itempath,$lastupdate,$updated) { // gives back the real patch name $theitem = realpath($itempath); // if $theitem is a real dir then it returns True and goes on if(is_dir($theitem)) { // gives something back that readdir can use $dirhandle = opendir($theitem); // will start a loop that will read the dir and places all the elements in an array named $files while(false !== ($files = readdir($dirhandle))) { // Will skip " . " and " .. " as files if(($files !== ".") && ($files !== "..")) { // checks if the element is a dir if(is_dir("".$theitem."/".$files."")) { $dirdate = filemtime("".$theitem."/".$files.""); $dirnames = realpath("".$theitem."/".$files.""); if($lastupdate < $dirdate) { array_push($updated,$dirnames); echo " dir ".$dirnames." $dirdate <BR>"; } // if the element is a dir it will give the dir name back to $subdir $subdir = realpath("".$theitem."/".$files.""); // and then it will run the script again from the top of the function only with the sub dir name rcopy($subdir,$lastupdate,$updated); } // if the element wasn't a dir then it will check if it's a file elseif(is_file("".$theitem."/".$files."")) { $filedate = filemtime("".$theitem."/".$files.""); $filenames = realpath("".$theitem."/".$files.""); if($lastupdate < $filedate) { array_push($updated,$filenames); echo " file ".$filenames." $filedate <BR>"; } } } } //closes the dir closedir($dirhandle); } return $updated; } $updated = array(); $tekopieeren = "sync"; $lastupdate = "1115763029"; $updated1 = rcopy($tekopieeren,$lastupdate,$updated); ?> <PRE> <? print_r($updated1); ?> <PRE> <? ?> |
ik heb ook al geprobeerd $updated[] = $filenames; ivp array_push($updated,$filenames);
maar dit geeft het zelfde resultaat.
hier een voorbeeld van de output:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| file c:\apache\apache\htdocs\dylan\sync\hallotest.txt 1115763901 dir c:\apache\apache\htdocs\dylan\sync\hallotestdir 1115770955 file c:\apache\apache\htdocs\dylan\sync\hallotestdir\hallotestdir.txt 1115770940 dir c:\apache\apache\htdocs\dylan\sync\hallotestdir\hallotestdir1 1115768283 file c:\apache\apache\htdocs\dylan\sync\hallotestdir\hallotestdir1\New Text Document.txt 1115768283 file c:\apache\apache\htdocs\dylan\sync\tdgfhfgjnvgjnfgh.txt 1115768530 file c:\apache\apache\htdocs\dylan\sync\test.php 1115763138 Array ( [0] => c:\apache\apache\htdocs\dylan\sync\hallotest.txt [1] => c:\apache\apache\htdocs\dylan\sync\hallotestdir [2] => c:\apache\apache\htdocs\dylan\sync\tdgfhfgjnvgjnfgh.txt [3] => c:\apache\apache\htdocs\dylan\sync\test.php ) |
[ Voor 254% gewijzigd door InfoTracer op 20-05-2005 19:44 ]