Re: [PHP] something like alert (javascript)
I'm implementing a system that allows the users create pages on-line. They can create several different pages to complete a site. What I want to do is alert them that there are still pages to be created before they finish. I'm trying to do it checking the files they create and alerting a message, but I think javascript can not check the files and php can not alert the user with a function like alert(). I'm using a simple print() (PHP) but alert() would be much better. - Original Message - From: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED] To: 'Eduardo Kokubo' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, October 03, 2001 11:38 AM Subject: RE: [PHP] something like alert (javascript) Then what do you need? We are not any sure on what your question is ... Maxim Maletsky www.PHPBeginner.com -Original Message- From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]] Sent: mercoledì 3 ottobre 2001 16.31 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP] something like alert (javascript) Is there any function in PHP that is similar to alert() or confirm() of javascript ? I tried die() but that's not what I need. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] something like alert (javascript)
Is there any function in PHP that is similar to alert() or confirm() of javascript ? I tried die() but that's not what I need.
[PHP] ftp
Hi, I'm trying to upload some files using PHP, but I'm limited to small files and I don't know why. Could anyone please help me with this?
[PHP] FTP
Hi, I'm trying to upload some files using PHP, but I'm limited to small files of 1Mb or a little more and I don't know why. Could anyone please help me with this? This is the message I get: Warning: error opening none in /home/proj/sapens/public_html/f1_material.php on line 51 the same code works with smaller files
[PHP] error
Hi, How can I change this error message to my own message? Warning: fopen(publico/d/bibliografia.html,w+) - No such file or directory
[PHP] code to see files in directories
I think I saw a code to list the files, subdirectories and the files in the subdirectories of a simple directory in this list some time ago, but I didn't save it. Considering the quantitie of messages in this list, It's quite dificult to find this specific code, so ask the person who did it or someone else to write this code again. I'm using this one: $publico = ftp_nlist ($servidor, public_html/publico); $cont = 0; while ($publico[$cont]){ print $publico[$cont]br; $cont++;} This code doesn't show the files in the subdirectories and it requires ftp connection. Not very efficient. Thanks in advance. Is there a problem if I just write thanks in advance??? It's easier then writting back to thanks everybody :)
[PHP] something worong
Hi, I'm using this code to delete a file using onunload, but this is not working. Can anyone please tell me why? I know the function apaga() works, but the onunload thing doesn't. I probably missed a detail. html head /head BODY onunload=return apaga($diretorio); ?php function apaga($diretorio){ unlink ($diretorio.tgz); }
Re: [PHP] something wrong
I tried it using return and without it, but unfortunly neither cases worked. - Original Message - From: Chris Cocuzzo [EMAIL PROTECTED] To: Eduardo Kokubo [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 2:21 PM Subject: Re: [PHP] something worong hey- I'm not sure, but maybe try this: body onunload=?php return apaga($diretorio);? for some reason i don't think that'd work, prolly because of the quotes around the php, however i think you need to call it that way. But can you ever use return that way?? chris - Original Message - From: Eduardo Kokubo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 1:12 PM Subject: [PHP] something worong Hi, I'm using this code to delete a file using onunload, but this is not working. Can anyone please tell me why? I know the function apaga() works, but the onunload thing doesn't. I probably missed a detail. html head /head BODY onunload=return apaga($diretorio); ?php function apaga($diretorio){ unlink ($diretorio.tgz); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] something wrong
Well, I did as you suggested but the page is popping up onload not onunload. BODY onunload=apaga(); script language=javascript function apaga(){ window.open(compressao2.php?diretorio=d14,compressao2,toolbar=no);} /script - Original Message - From: Rich Cavanaugh [EMAIL PROTECTED] To: Eduardo Kokubo [EMAIL PROTECTED]; Chris Cocuzzo [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 2:52 PM Subject: RE: [PHP] something wrong Ok, this is just a variant of a question asked almost daily. You are trying to call a PHP function using JavaScript. PHP is handled on the server, JavaScript is done client side. The browser doesn't know anything about PHP. Another option might be to use the onunload handler to popup (might piss off people though) a window which would load that PHP script and delete the file. rich -Original Message- From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 1:49 PM To: Chris Cocuzzo Cc: [EMAIL PROTECTED] Subject: Re: [PHP] something wrong I tried it using return and without it, but unfortunly neither cases worked. - Original Message - From: Chris Cocuzzo [EMAIL PROTECTED] To: Eduardo Kokubo [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 2:21 PM Subject: Re: [PHP] something worong hey- I'm not sure, but maybe try this: body onunload=?php return apaga($diretorio);? for some reason i don't think that'd work, prolly because of the quotes around the php, however i think you need to call it that way. But can you ever use return that way?? chris - Original Message - From: Eduardo Kokubo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 1:12 PM Subject: [PHP] something worong Hi, I'm using this code to delete a file using onunload, but this is not working. Can anyone please tell me why? I know the function apaga() works, but the onunload thing doesn't. I probably missed a detail. html head /head BODY onunload=return apaga($diretorio); ?php function apaga($diretorio){ unlink ($diretorio.tgz); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] something wrong
Sorry, forget what I said. The code is working fine with your suggestion. I was refreshing the page constantly and each time it was opening the window. - Original Message - From: Rich Cavanaugh [EMAIL PROTECTED] To: Eduardo Kokubo [EMAIL PROTECTED]; Chris Cocuzzo [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 2:52 PM Subject: RE: [PHP] something wrong Ok, this is just a variant of a question asked almost daily. You are trying to call a PHP function using JavaScript. PHP is handled on the server, JavaScript is done client side. The browser doesn't know anything about PHP. Another option might be to use the onunload handler to popup (might piss off people though) a window which would load that PHP script and delete the file. rich -Original Message- From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 1:49 PM To: Chris Cocuzzo Cc: [EMAIL PROTECTED] Subject: Re: [PHP] something wrong I tried it using return and without it, but unfortunly neither cases worked. - Original Message - From: Chris Cocuzzo [EMAIL PROTECTED] To: Eduardo Kokubo [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 2:21 PM Subject: Re: [PHP] something worong hey- I'm not sure, but maybe try this: body onunload=?php return apaga($diretorio);? for some reason i don't think that'd work, prolly because of the quotes around the php, however i think you need to call it that way. But can you ever use return that way?? chris - Original Message - From: Eduardo Kokubo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 1:12 PM Subject: [PHP] something worong Hi, I'm using this code to delete a file using onunload, but this is not working. Can anyone please tell me why? I know the function apaga() works, but the onunload thing doesn't. I probably missed a detail. html head /head BODY onunload=return apaga($diretorio); ?php function apaga($diretorio){ unlink ($diretorio.tgz); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] something wrong
Well, I did as you suggested but the page is popping up onload not onunload.forget it. this code is working fine. I was refreshing the page, what was calling the unload function. BODY onunload=apaga(); script language=javascript function apaga(){ window.open(compressao2.php?diretorio=d14,compressao2,toolbar=no);} /script - Original Message - From: Rich Cavanaugh [EMAIL PROTECTED] To: Eduardo Kokubo [EMAIL PROTECTED]; Chris Cocuzzo [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 2:52 PM Subject: RE: [PHP] something wrong Ok, this is just a variant of a question asked almost daily. You are trying to call a PHP function using JavaScript. PHP is handled on the server, JavaScript is done client side. The browser doesn't know anything about PHP. Another option might be to use the onunload handler to popup (might piss off people though) a window which would load that PHP script and delete the file. rich -Original Message- From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 1:49 PM To: Chris Cocuzzo Cc: [EMAIL PROTECTED] Subject: Re: [PHP] something wrong I tried it using return and without it, but unfortunly neither cases worked. - Original Message - From: Chris Cocuzzo [EMAIL PROTECTED] To: Eduardo Kokubo [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 2:21 PM Subject: Re: [PHP] something worong hey- I'm not sure, but maybe try this: body onunload=?php return apaga($diretorio);? for some reason i don't think that'd work, prolly because of the quotes around the php, however i think you need to call it that way. But can you ever use return that way?? chris - Original Message - From: Eduardo Kokubo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 1:12 PM Subject: [PHP] something worong Hi, I'm using this code to delete a file using onunload, but this is not working. Can anyone please tell me why? I know the function apaga() works, but the onunload thing doesn't. I probably missed a detail. html head /head BODY onunload=return apaga($diretorio); ?php function apaga($diretorio){ unlink ($diretorio.tgz); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] again
I'm still trying to transfer a directory form one server to another but with no results. I have the username and password of the ftp account source and I know I'll have to ask for the username and password of the destination. I can't simply upload or copy the directory, but there must have an alternative way. I know I have been asking a lot of questions and I already asked this one, but I'm new with php and we can't learn everything from books, so...
[PHP] window.open (javascript)
I passed some vars to another page using window.open and it worked fine (but had to hide the toolbar). The problem is that wen I check their values like this: ?php if ($test){ print bTest: /b; print $test; print brbr\n;} if ($adicionais){ print bInformações adicionais: /b; print $adicionais; print brbr\n;} ? This code always prints Teste and a 0 when it shouldn't print anything. ?php if ($test != 0){ print bTest: /b; print $test; print brbr\n;} if ($adicionais != 0){ print bInformações adicionais: /b; print $adicionais; print brbr\n;} ? This one never prints anything. When I use or ' ' to check the 0, it happens the same thing that the first code. The other vars that don't use if are working fine. Can anybody please explain this?
[PHP] also window.open(javascript)
I know I sent I message to this list 10 seconds ago, but I have forgot to ask this, it's a different problem. I asked for a file name to upload via html form and tried to pass this file to another page using window.open to redirect to a new window (I submited first and tried to redirect it from the following page) but it didn't work. Can I do anything about this?
Re: [PHP] Re: window.open (javascript)
This is the code. I use print (php) three times but in the end the code is generated correctly (another test I'm doing) . I just noticed that the last variable a pass can be checked using if, but the others can't. I also changed the name of the variable. instead of $test I use $publicacoes. ? print script language=javascript\n; if (!$foto){ print window.open (\professor.php?nome=$nome curriculo=$curriculo interesse=$interesse adicionais=$adicionais publicacoes=$publicacoes; print \, \Professor\, [\toolbar=no\]);\n;} else{ print window.open (\f3_professor.php?nome=$nome curriculo=$curriculo interesse=$interesse adicionais=$adicionais publicacoes=$publicacoes; print \, \f3_professor\, [\toolbar=no\]);\n;} print /script; ? - Original Message - From: elias [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 10:42 AM Subject: [PHP] Re: window.open (javascript) can you show us the code that does the window.open('myfile.php?test=hey') for example ? Eduardo Kokubo [EMAIL PROTECTED] wrote in message 016e01c119b4$d784d920$a102a8c0@cttmar">news:016e01c119b4$d784d920$a102a8c0@cttmar... I passed some vars to another page using window.open and it worked fine (but had to hide the toolbar). The problem is that wen I check their values like this: ?php if ($test){ print bTest: /b; print $test; print brbr\n;} if ($adicionais){ print bInformações adicionais: /b; print $adicionais; print brbr\n;} ? This code always prints Teste and a 0 when it shouldn't print anything. ?php if ($test != 0){ print bTest: /b; print $test; print brbr\n;} if ($adicionais != 0){ print bInformações adicionais: /b; print $adicionais; print brbr\n;} ? This one never prints anything. When I use or ' ' to check the 0, it happens the same thing that the first code. The other vars that don't use if are working fine. Can anybody please explain this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] another question
Does anybody knows how to redirect a page to new window with all the vars from the old one? Can I leave a message in the old window? Thanks in advance.
[PHP] php
Hi, Is it possible to compress an entire directory using an external program like pkzip? If it is possible, how can I do it?
[PHP] new problem
Hello, I have to transfer a directory and all it's files and subdirectories from one server to another or from one acount to another, but I guess ftp_put or copy can not do it ( This directory must not be compressed). ANY help woud be very very welcome.
[PHP] odd behavior
Hi, I have been trying to create a directory and a file in it on my server, but my code is not working fine. ?php $arquivo = fopen(publico/diretorio.txt,r); $cont = fread($arquivo, 5); $cont++; fclose ($arquivo); $arquivo = fopen (publico/diretorio.txt,w+); fwrite ($arquivo, $cont); fclose ($arquivo); setcookie(cont, $cont); $diretorio = d.$cont; if (!is_dir(publico/$diretorio)){ $dirteste = mkdir(publico/$diretorio,0777);} if ($textfile = fopen(publico/$diretorio/index.html, w+)){ fputs($textfile,ob_get_contents()); fclose($textfile); chmod(publico/$diretorio/index.html, 0755);} ob_end_flush(); ? This was working fine and then stoped. Does anybody know what happened? I have permission to write but I'm receving the following message: Warning: fopen(publico/d6/index.html,w+) - Permission denied in /home/a0010927/public_html/index.php on line 56