php-general Digest 28 Oct 2007 06:28:10 -0000 Issue 5096
Topics (messages 263747 through 263755):
Re: libgmailer.php
263747 by: Daniel Brown
Re: returning an array from a function?
263748 by: tedd
Java And PHP
263749 by: Gevorg Harutyunyan
Re: Slashes, include, AJAX? {SOLVED}
263750 by: Nathan Nobbe
SPL
263751 by: Børge Holen
263752 by: Nathan Nobbe
263753 by: Børge Holen
263754 by: Jochem Maas
263755 by: Jim Lucas
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
On 10/27/07, arash moosavi <[EMAIL PROTECTED]> wrote:
> I Need an example code of using Libgmailer.php for reading mails from gmail.
> I can login to the gmail with this Class(libgmailer.php) but I can not find
> its string output of emails text.
>
> Thank all
>
Arash,
You've been asking the same vague questions over and over again.
You need to find a list or forum that deals with libgmailer.php. This
is not a PHP-specific question.
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
Give a man a fish, he'll eat for a day. Then you'll find out he was
allergic and is hospitalized. See? No good deed goes unpunished....
--- End Message ---
--- Begin Message ---
At 5:38 AM -0700 10/27/07, [EMAIL PROTECTED] wrote:
Hello List,
Your help produced a refined function. The function converts a
Google Map latitude and longitude into an equivalent Microsoft
Virtual Earth latitude and longitude.
Oh no, don't tell me that I helped the Dark-side -- there is a
disturbance in the force, Luke.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
Hi,
I want to use Java in my PHP scripts.
I installed PHP 5.2 on windows.
>From extensions I choosed Java plugin.
But Java is not working with PHP 5.2.
I have Java installed in C:\Porgram Files\Java\ .
I tried to give right jvm.dll path correct C:\Porgram
Files\Java\JDK\JRE\bin\server\jvm.dll or
C:\Porgram Files\Java\JDK\JRE\bin\client\jvm.dll in php.ini, but I got
windows system error when try to call Java in my PHP scripts.
If you configured java to work with PHP 5.2 please give me hint.
Thank you,
Gevorg Harutyunyan
--- End Message ---
--- Begin Message ---
On 10/26/07, Rodrigo Poblanno Balp <[EMAIL PROTECTED]> wrote:
>
> Nathan Nobbe wrote:
>
> On 10/26/07, Rodrigo Poblanno Balp <[EMAIL PROTECTED]> wrote:
> >
> > I get something like <div>this is the content<\/div>
> > it seems like the '/' is being escaped, but I need it as HTML.
> >
>
> how are you using the json object on the client-side after its sent by the
> server?
>
> below is a json snippet from an application of mine, many of the tags look
> the same
> as what youve shown (because theyve been encoded the same way).
> ive have not encountered the problem you have, that is, the escape
> characters do
> not pass though when i splice them into the DOM.
> im using the same encoding technique i recommended within PHP. on the
> client side
> i instantiate the json object as follows:
>
> var htmlUpdates = eval("(" + transport.responseText + ")");
>
> if you use a string directly on the client side, the escape characters
> will pass
> through, however, if you run it through eval(), the escape characters will
> be stipped
> out by the javascript interpreter. im not sure whats going on, but im
> starting to think
> its something on the client side..
>
> -nathan
>
>
> {"prevUpperNavId":"0:0","nextUpperNavId":"1:1","breadcrumb":"","leftContent":"<p>\nPHP
> is very interesting
>
> . One of it's greatest strengths is the gradient of
> development\npossibilities. A new PHP writer can
>
> easily publish their first dynamic page in a matter\nof minutes. Using
> PHP's integrated templating
>
> system, PHP scripts can be escaped at any time.\nSo escaping them simply
> outputs anything text directly
>
> as it appears in the script. By adding\nscript tags into large pages of
> code and dropping in PHP function
>
> calls, dynamic pages are easily\nobtained.<br\/>\n<br\/>\nAlthough handy,
> this isnt often the greatest
>
> technique for developing highly reusable or readable code.\nPHP offers many
> options for templating HTML
>
> . This is just the beginning. As a PHP developer, you will\nfind yourself
> needing to know a lot of
>
> technologies.\n<\/p>","rightContent":"<div>\n<p>\n\tHere is a small list of
> terms and acronyms one might
>
> encounter working with PHP;\n\thow many do you
> recognize?\n<\/p>\n\t<ul>\n\t\t<li>\n\t\t\tObject Oriented
>
> Programming\n\t\t<\/li>\n\t\t<li>\n\t\t\tDesign
> Patterns\n\t\t<\/li>\n\t\t<li>\n\t\t\tMVC\n\t\t<\/li
>
> >\n\t\t<li>\n\t\t\tORM\n\t\t<\/li>\n\t\t<li>\n\t\t\tZend\n\t\t<\/li>\n\t\t<li>\n\t\t\tCMS\n\t\t<\/li
>
> >\n\t\t<li>\n\t\t\tShared
> >Nothing\n\t\t<\/li>\n\t\t<li>\n\t\t\tAJAX\n\t\t<\/li>\n\t\t<li>\n\t\t\tJSON
>
> \n\t\t<\/li>\n\t\t<li>\n\t\t\tUnit
> Test\n\t\t<\/li>\n\t\t<li>\n\t\t\tSOAP\n\t\t<\/li>\n\t<\/ul>\n<\/div
>
> >"}
>
> Ok Nathan,
> that's correct.
>
> Once the object is decoded the \/ pairs go away. But this is something to
> note, only after it is decoded.
> I was testing only the creation of the JSON object and printing it, not
> the associative php array. So that's
> why I got the annoying \/.
>
> This is nothing to be afraid then, once the text is used, there's no need
> to think about the pairs. It is not
> even necessary to eliminate the \r\n windows puts in, that way the html
> snippet will be formated.
>
i was only thinking to strip the newlines on the server as a last resort;
the downside would
be messy html after splicing it back into the dom. anyway, glad to hear you
got it figured out; i knew
there was something i was missing :)
-nathan
--- End Message ---
--- Begin Message ---
I'm currently using RecursiveDirectoryIterator and RecursiveIteratorIterator.
I'm using fwrite to write to a file while parsing throught the file structure,
and was wondering if it is at all possible to sort alphabetical without going
all array. That seems to me like doing the job twice over. Atleast part of
it...
--
---
Børge Holen
http://www.arivene.net
--- End Message ---
--- Begin Message ---
On 10/27/07, Børge Holen <[EMAIL PROTECTED]> wrote:
>
> I'm currently using RecursiveDirectoryIterator and
> RecursiveIteratorIterator.
> I'm using fwrite to write to a file while parsing throught the file
> structure,
> and was wondering if it is at all possible to sort alphabetical without
> going
> all array. That seems to me like doing the job twice over. Atleast part of
> it...
>
how are you doing the sorting part?
can you show us some of your code ?
-nathan
--- End Message ---
--- Begin Message ---
On Sunday 28 October 2007 01:32:15 you wrote:
> On 10/27/07, Børge Holen <[EMAIL PROTECTED]> wrote:
> > I'm currently using RecursiveDirectoryIterator and
> > RecursiveIteratorIterator.
> > I'm using fwrite to write to a file while parsing throught the file
> > structure,
> > and was wondering if it is at all possible to sort alphabetical without
> > going
> > all array. That seems to me like doing the job twice over. Atleast part
> > of it...
>
> how are you doing the sorting part?
> can you show us some of your code ?
thats the problem, i don't know how to sort before read starts, that came out
a bit wrong. I need to read the filesystem alphabeticly.
I could use the system command 'find somepath' and then use '| sort'
witch was part of my old stuff with a ton of waste code.
or I could 'sort array' witch of course forces me to create an array to loop
around and push at each folder and leaf.
I found this code at php.net witch needs very little modifications and can do
so much, but I can't figure out how to make it read alphabeticly as mentioned
$it = new RecursiveDirectoryIterator($_GET['location']);
foreach (new RecursiveIteratorIterator($it, 2) as $path){
if($path->isDir()){
// writing to some static file
}elseif(some unfinished statement){
fwrite($dynfile, "$path\n");
}else{
// writing to some static file
}
}
I just... nothings keeping me from sorting the the dynfile after writing, but
also that seems to do the job twice instead of doing it correct the first
time.
>
> -nathan
--
---
Børge Holen
http://www.arivene.net
--- End Message ---
--- Begin Message ---
Børge Holen wrote:
> On Sunday 28 October 2007 01:32:15 you wrote:
>> On 10/27/07, Børge Holen <[EMAIL PROTECTED]> wrote:
>>> I'm currently using RecursiveDirectoryIterator and
>>> RecursiveIteratorIterator.
>>> I'm using fwrite to write to a file while parsing throught the file
>>> structure,
>>> and was wondering if it is at all possible to sort alphabetical without
>>> going
>>> all array. That seems to me like doing the job twice over. Atleast part
>>> of it...
>> how are you doing the sorting part?
>> can you show us some of your code ?
>
> thats the problem, i don't know how to sort before read starts, that came out
> a bit wrong. I need to read the filesystem alphabeticly.
>
> I could use the system command 'find somepath' and then use '| sort'
> witch was part of my old stuff with a ton of waste code.
> or I could 'sort array' witch of course forces me to create an array to loop
> around and push at each folder and leaf.
>
> I found this code at php.net witch needs very little modifications and can do
> so much, but I can't figure out how to make it read alphabeticly as mentioned
>
> $it = new RecursiveDirectoryIterator($_GET['location']);
^-- you modified this
part right?
> foreach (new RecursiveIteratorIterator($it, 2) as $path){
> if($path->isDir()){
> // writing to some static file
> }elseif(some unfinished statement){
> fwrite($dynfile, "$path\n");
> }else{
> // writing to some static file
> }
> }
>
> I just... nothings keeping me from sorting the the dynfile after writing, but
> also that seems to do the job twice instead of doing it correct the first
> time.
you have a file stream open, I have no idea what a $path->__toString() results
in
but I'll assume it's the full path. whats to stop you seeking in the file and
using
string comparison to find the correct position (ie. line) to inject a path.
so basically sort as you write into the file, how to do this efficiently
is another question. :-)
>
>> -nathan
>
>
>
--- End Message ---
--- Begin Message ---
Børge Holen wrote:
I found this code at php.net witch needs very little modifications and can do
so much, but I can't figure out how to make it read alphabeticly as mentioned
$it = new RecursiveDirectoryIterator($_GET['location']);
foreach (new RecursiveIteratorIterator($it, 2) as $path){
if($path->isDir()){
// writing to some static file
}elseif(some unfinished statement){
fwrite($dynfile, "$path\n");
}else{
// writing to some static file
}
}
I just... nothings keeping me from sorting the the dynfile after writing, but
also that seems to do the job twice instead of doing it correct the first
time.
-nathan
I am trying to figure out what you are trying to do here.
--
Jim Lucas
"Perseverance is not a long race;
it is many short races one after the other"
Walter Elliot
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--- End Message ---