|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
On Tue, 24 Jul 2007 23:04:46 +0200, Jean Pierre Daviau <Once@WasEno.ugh>
wrote: > global $autoexec; > $autoexec = "C:\backJP\autoexec.bat"; > --- snip ---- > > require_once('paths.inc'); > function updateFichier(){ > if (!$myBool = fopen ($autoexec, "a")) { > echo "Cant create($autoexec)"; > exit; > } > > The include file is printed on screen > The function exit with Cant create the file > > If I write > function updateFichier(){ > global $autoexec; > $autoexec = "autoexec.bat"; This last line is not neccesary > ...... > it works . . . You obviously missed something in scopes. I suggest you read up on it: <http://www.php.net/global> This very example is explained over there. -- Rik Wasmus |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
It seems that the include path are not considered as files.
is_file($autoexec) returns false I changed this: --- inc file ---- $autoexec = "auto.bat"; $path = "\n%path%=%path%;c:\php\php.exe"; ---- > --- snip ---- require_once('paths.inc'); function updateFichier(){ global $autoexec, $path; > if (!$myBool = fopen ($autoexec, "a")) { > echo "Cant create($autoexec)"; > exit; > } > > The include file is printed on screen > The function exit with Cant create the file |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Nothing works.
The doc points that the function should be in the include. This is not what I want. Thanks. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Thu, 26 Jul 2007 16:36:54 +0200, Jean Pierre Daviau <Once@WasEno.ugh>
wrote: > Nothing works. > > The doc points that the function should be in the include. This > is not what I want. That's not what's wrong. You probably cannot create a file in C:\Program Files\EasyPHP1-8\php\ due to rights -- Rik Wasmus |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Xp I have all permissions and I set those folders for writing and reading. Still does not work |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On 26 juil, 12:42, "Jean Pierre Daviau" <O...@WasEno.ugh> wrote:
> I am on the command line how do I create the permission? > > get_include_path() === .;C:\php5\pear > I putted the file there and EasyPhp is not running. > > "Rik" <luiheidsgoe...@hotmail.com> a écrit dans le message denews: op.tv2tnwltqnv3q9@metallium... > > > > > On Thu, 26 Jul 2007 16:36:54 +0200,JeanPierreDaviau > > <O...@WasEno.ugh> wrote: > > >> Nothing works. > > >> The doc points that the function should be in the include. > >> This > >> is not what I want. > > > That's not what's wrong. You probably cannot create a file in > > C:\Program Files\EasyPHP1-8\php\ due to rights > > -- > > Rik Wasmus- Masquer le texte des messages précédents - > > - Afficher le texte des messages précédents - The solution is to enclose the .inc variables in between <??>¨ --------- path.inc --------------- <?php $autoexec = "auto.bat"; $path = "\n%path%=%path%;c:\php\php.exe"; --------- eof path.inc --------------- ?> |
|
![]() |
| Outils de la discussion | |
|
|