Nieuwsgroepen: alt.comp.lang.php
Van: "Trevor Barker" <trevor.bark...@ntlworld.com>
Datum: Fri, 24 Sep 2004 21:53:54 GMT
Lokaal: vr 24 sep 2004 23:53
Onderwerp: File system commands
Hi,
I've been trying to work out how to issue file system commands from a PHP Thanks Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
| ||||||||||||||
Nieuwsgroepen: alt.comp.lang.php
Van: "Janwillem Borleffs" <j...@jwscripts.com>
Datum: Sat, 25 Sep 2004 01:24:21 +0200
Lokaal: za 25 sep 2004 01:24
Onderwerp: Re: File system commands
Trevor Barker wrote: You can only execute file system commands when the files and directories are > I've been trying to work out how to issue file system commands from a > PHP script to Redhat Linux. I want to be able to delete files and > directories, and copy files. I thought that using 'exec', 'system', > or 'passthru' would be the answer but although they don't produce > errors (thereby indicating that they work), the don't actually carry > out the command. Can anyone suggest how I should do it please? either chmod 777 or writeable by Apache. I'm sure that when you run the following code it will print 1, indicating <? Furthermore, it's more efficient to use native PHP functions instead of Per example: To delete a file, use unlink(); to remove a dir use rmdir(); to copy a file What you should do is the following: 1. Create a sandbox directory which you chmod to 777 HTH; Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
| ||||||||||||||
Nieuwsgroepen: alt.comp.lang.php
Van: Andy Hassall <a...@andyh.co.uk>
Datum: Sat, 25 Sep 2004 00:40:04 +0100
Lokaal: za 25 sep 2004 01:40
Onderwerp: Re: File system commands
On Fri, 24 Sep 2004 21:53:54 GMT, "Trevor Barker" <trevor.bark...@ntlworld.com>
wrote: >I've been trying to work out how to issue file system commands from a PHP PHP has various PHP-native filesystem functions which are arguably better >script to Redhat Linux. I want to be able to delete files and directories, >and copy files. I thought that using 'exec', 'system', or 'passthru' would >be the answer but although they don't produce errors (thereby indicating >that they work), the don't actually carry out the command. Can anyone >suggest how I should do it please? choices than spawning shells and opening potential command injection, performance and portability issues. See the Filesystem Functions chapter of the PHP manual for details. -- Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
| ||||||||||||||
Nieuwsgroepen: alt.comp.lang.php
Van: Steven Stern <sdsternNOSPAMH...@NOSPAMHEREmindspring.com>
Datum: Sun, 26 Sep 2004 12:41:56 GMT
Lokaal: zo 26 sep 2004 14:41
Onderwerp: Re: File system commands
On Fri, 24 Sep 2004 21:53:54 GMT (more or less), "Trevor Barker"
<trevor.bark...@ntlworld.com> wrote: Here's a simple script that searches a given directory and deletes files more >Hi, >I've been trying to work out how to issue file system commands from a PHP >Thanks than 2 days old. Look up file functions on php.net. #! /bin/php // calculate two days ago $now = time(); // make a list of files in tmp $dir = '/www/htdocs/admin/tmp/'; } closedir($handle); ?> Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
| ||||||||||||||
Nieuwsgroepen: alt.comp.lang.php
Van: "Trevor Barker" <trevor.bark...@ntlworld.com>
Datum: Sun, 26 Sep 2004 21:00:04 GMT
Lokaal: zo 26 sep 2004 23:00
Onderwerp: Re: File system commands
Thanks guys, I think ownership is the key to the problem i've been having
but I will look at the internal funnctions too, I didnt realise they were there. news:o3edl01gj0gpgac2b6b3e6fsu2c6nt518a@4ax.com... Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
| ||||||||||||||
| Discussiegroep maken - Google Discussiegroepen - Google Startpagina - Servicevoorwaarden - Privacybeleid |
| ©2009 Google |