Gegroet mensen van het Wereld Wijde Web,
Ik heb een probleem:
Het bestand met word aangemaakt in het mapje source in private_html.
Daarna word de content in een variable gestopt.
Als laatste word de file verwijderd.
En dat laatste dat lukt niet.
Warning: ftp_delete(): Could not delete /home/x/domains/x.s2.one2xs.com/private_html/source/admin.php.txt: No such file or directory in /home/x/domains/x.s2.one2xs.com/public_html/admin/ftp.php on line 99
nu zou je zeggen dat het pad niet klopt. Maar ik gebruik het zelfde pad om de file aan te maken en dat werkt wel?
Hoe kan ik dit oplossen?
toevoeging op 15 juni 2013, 16:28:06:
Mappen constructie:
Afbeelding niet beschikbaarDe bron kon niet worden geladen (img109.imageshack.us).Bron openen ↗
Ik heb een probleem:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR]ftp_directory_exists[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ftp_server[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$path[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$ftp_serverpath[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]/../[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$files[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$fix[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]public_html[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$files[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$ftp_local[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]/home/x/domains/x.s2.one2xs.com/private_html/source[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$fix[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000].txt[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/ftp_get"]ftp_get[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ftp_server[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ftp_local[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ftp_serverpath[/COLOR][COLOR= #007700],[/COLOR] FTP_BINARY[COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ftp_local[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/ftp_delete"]ftp_delete[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ftp_server[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ftp_local[/COLOR][COLOR= #007700]);
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Oeps, bestand bestaat niet."[/COLOR][COLOR= #007700];
}[/COLOR] Het bestand met word aangemaakt in het mapje source in private_html.
Daarna word de content in een variable gestopt.
Als laatste word de file verwijderd.
En dat laatste dat lukt niet.
Warning: ftp_delete(): Could not delete /home/x/domains/x.s2.one2xs.com/private_html/source/admin.php.txt: No such file or directory in /home/x/domains/x.s2.one2xs.com/public_html/admin/ftp.php on line 99
nu zou je zeggen dat het pad niet klopt. Maar ik gebruik het zelfde pad om de file aan te maken en dat werkt wel?
Hoe kan ik dit oplossen?
toevoeging op 15 juni 2013, 16:28:06:
Mappen constructie:
Afbeelding niet beschikbaarDe bron kon niet worden geladen (img109.imageshack.us).Bron openen ↗
De bestanden werden aangemaakt, maar ik kon ze nergens terugvinden. Uiteindelijk dankzij de juiste chmod instellingen 755 werkte alles perfect 