Salut!
Je veux copier un script php dans un sous repertoire mais il me dit qu´il ne peut pas lire mon script car il n´existe pas.
Pourtant c´est le script qui s´execute que je veux copier ( avec la fonction phpcopy ( ficsource , ficdet ) ; )
Aidez moi svp.
je vous donne mon code ( bourrin je sais mais bon ) :
< ?php$dossierpresent= opendir(".");
while ( $dirficlink = readdir($dossierpresent) ) { if ( is_file($dirficlink) ) { echo $dirficlink." < br> " ; } else { if ( is_dir($dirficlink) ) { echo " < b> Repertoire : " .$dirficlink." < /b> < br> " ; if ( ( $dirficlink ! = " ." ) and ( $dirficlink ! = " .." ) ) {
$nom = $_SERVER[SCRIPT_NAME];
$num = strpos($nom,r); for ( $i=1 ; $i < = $num + 2 ; $i++ ) $a=substr($nom,$i);
$doss=opendir($dirficlink);
if ( ! copy( $nom , $dirficlink."\\".$a ) ) { echo " Echec < br>"; }
closedir($doss); } } else { if ( is_link($dirficlink) ) { echo " < u> Lien : " .$dirficlink." < /u> < br> " ; } } }} closedir($dossierpresent);? >
< ?php$dir = " img/";$file = " ton_script.php";
if ( $dh = opendir($dir)) { while ( ($path = readdir($dh)) ! == false) { if ( is_dir($dir.$path)) { if ( $path ! = ´.´ && $path ! = ´..´) { copy(´dir.php´, $dir.$path.´/´.$file´); } } }closedir($dh);}? >
putain merde, total foirage là
remplaces: dir.php par $file
Je t´en remercie !