php-general Digest 30 Sep 2010 09:03:05 -0000 Issue 6966

Topics (messages 308353 through 308364):

reporting spam in PHP manual?
        308353 by: MikeB
        308354 by: Daniel P. Brown

Which PHP 5.3 documentation generators have you found?
        308355 by: Adam Richardson
        308356 by: [email protected]
        308357 by: Adam Richardson

converting a mysql date value
        308358 by: David Mehler
        308359 by: Adam Richardson
        308360 by: Steve Staples
        308361 by: Alejandro Michelin Salomon

Re: PHP Email Question
        308362 by: Joe Jackson

Open Source Website Flowchart and Wireframe Software?
        308363 by: Daniel Kolbo

file_get_contents() failing on CentOS.
        308364 by: Richard Quadling

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 ---
Came across this entry as a user comment in the php.net manual.

http://www.php.net/manual/en/language.exceptions.php#100089

Couldn't see how to report it so it could be removed.

Maybe someone that knows how can tell me, or report it themselves?

Thanks,


--- End Message ---
--- Begin Message ---
On Wed, Sep 29, 2010 at 12:12, MikeB <[email protected]> wrote:
> Came across this entry as a user comment in the php.net manual.
>
> http://www.php.net/manual/en/language.exceptions.php#100089
>
> Couldn't see how to report it so it could be removed.
>
> Maybe someone that knows how can tell me, or report it themselves?

    I was just getting ready to do it, but Richard Quadling beat me to
the punch.  Thanks for pointing it out though, Mike.

-- 
</Daniel P. Brown>
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

--- End Message ---
--- Begin Message ---
Hi all,

Anybody know of a documentation generator which plays nicely with PHP 5.3?

Thanks,

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

--- End Message ---
--- Begin Message ---
Does phpDocumenter not do the trick? I must admit, I've not tried anything 
specific to 5.3 (i can imagine the namespace thing would be a major part if the 
documentation) but its served me well with other php5 code.

Thanks,
Ash
http://www.ashleysheridan.co.uk

----- Reply message -----
From: "Adam Richardson" <[email protected]>
Date: Wed, Sep 29, 2010 19:36
Subject: [PHP] Which PHP 5.3 documentation generators have you found?
To: "PHP-General" <[email protected]>

Hi all,

Anybody know of a documentation generator which plays nicely with PHP 5.3?

Thanks,

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

--- End Message ---
--- Begin Message ---
On Wed, Sep 29, 2010 at 2:54 PM, [email protected] <
[email protected]> wrote:

> Does phpDocumenter not do the trick? I must admit, I've not tried anything
> specific to 5.3 (i can imagine the namespace thing would be a major part if
> the documentation) but its served me well with other php5 code.
>
>
>
In the past I've been really pleased using phpDocumentor, however I'm afraid
the namespaces in 5.3 cause it to choke :(

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

--- End Message ---
--- Begin Message ---
Hello,
I've got dates stored in a mysql database. The field is of type date
so the value is something like: "2010-09-29" I'm wanting to display
them as in U.S. dates as in month, day, year. I had a function that
did this, now it is not working and I am perplexed as to why. Here's
my echo statement:

<?php echo sqlDateFormat($row['date']); ?>

The $row['date'] is coming out of the mysql database. Here's the
sqlDateFormat function:

function sqlDateFormat($value) {
$date = $value;
$date = strtotime($date);
$date = date('m-d-y', $date);
return $date;
}

I'd appreciate any suggestions as to why this isn't working.
Thanks.
Dave.

--- End Message ---
--- Begin Message ---
On Wed, Sep 29, 2010 at 3:11 PM, David Mehler <[email protected]> wrote:

> Hello,
> I've got dates stored in a mysql database. The field is of type date
> so the value is something like: "2010-09-29" I'm wanting to display
> them as in U.S. dates as in month, day, year. I had a function that
> did this, now it is not working and I am perplexed as to why. Here's
> my echo statement:
>
> <?php echo sqlDateFormat($row['date']); ?>
>
> The $row['date'] is coming out of the mysql database. Here's the
> sqlDateFormat function:
>
> function sqlDateFormat($value) {
> $date = $value;
> $date = strtotime($date);
> $date = date('m-d-y', $date);
> return $date;
> }
>
> I'd appreciate any suggestions as to why this isn't working.
> Thanks.
> Dave.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
What's being echoed out?

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

--- End Message ---
--- Begin Message ---
http://www.w3schools.com/sql/func_date_format.asp

when you do your select,  "SELECT DATE_FORMAT(`field_name`,'%b %d %Y %h:
%i %p') AS 'field_name'"

which would yield you the field "field_name":
'Nov 04 2008 11:45 PM'

would be easier to do it there, rather than in your PHP... and you can
change the date_format in your query via PHP if you need to change it on
the fly... 

if the dates were in UNIX TIME, you can do it like:
SELECT DATE_FORMAT(FROM_UNIXTIME(`field_name_in_unix_timestamp`),'%b %d
%Y %h:%i %p');


Steve

On Wed, 2010-09-29 at 15:11 -0400, David Mehler wrote:
> Hello,
> I've got dates stored in a mysql database. The field is of type date
> so the value is something like: "2010-09-29" I'm wanting to display
> them as in U.S. dates as in month, day, year. I had a function that
> did this, now it is not working and I am perplexed as to why. Here's
> my echo statement:
> 
> <?php echo sqlDateFormat($row['date']); ?>
> 
> The $row['date'] is coming out of the mysql database. Here's the
> sqlDateFormat function:
> 
> function sqlDateFormat($value) {
> $date = $value;
> $date = strtotime($date);
> $date = date('m-d-y', $date);
> return $date;
> }
> 
> I'd appreciate any suggestions as to why this isn't working.
> Thanks.
> Dave.
> 



--- End Message ---
--- Begin Message ---
David :

Try this :

$a = explode('-', '2010-01-23');
$b = array( $a[1], $a[2], $a[0] );

echo implode( '/', $b);

// 01/23/2010 

Alejandro M.S.

-----Mensagem original-----
De: David Mehler [mailto:[email protected]] 
Enviada em: quarta-feira, 29 de setembro de 2010 16:12
Para: php-general
Assunto: [PHP] converting a mysql date value

Hello,
I've got dates stored in a mysql database. The field is of type date
so the value is something like: "2010-09-29" I'm wanting to display
them as in U.S. dates as in month, day, year. I had a function that
did this, now it is not working and I am perplexed as to why. Here's
my echo statement:

<?php echo sqlDateFormat($row['date']); ?>

The $row['date'] is coming out of the mysql database. Here's the
sqlDateFormat function:

function sqlDateFormat($value) {
$date = $value;
$date = strtotime($date);
$date = date('m-d-y', $date);
return $date;
}

I'd appreciate any suggestions as to why this isn't working.
Thanks.
Dave.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
Hi

I am trying the following snippet as Bostjan  suggested, and an email is
getting sent when I submit the form however in the body of the email I am
getting none of the form data in the body of the email.  All I am getting is
the letter 'z' ?  Also in the from field of the email this is showing as my
email address and not the email address of the user who has sent the form

Any ideas on where I am going wrong with this snippet?  Any advice would be
much appreciated


$msgContent = "Name: ". $values['name'] ."\n";
$msgContent .= "Address: ". $values['address'] ."\n";
$msgContent .= "Telephone: ". $values['telephone'] ."\n";
$msgContent .= "Email Address: ". $values['emailaddress'] ."\n";
$msgContent .= "Message: ". $values['message'] ."\n";

function ProcessForm($values)
{
    mail('myemail:domain.com', 'Website Enquiry', $msgContent, "From:
\"{$values['name']}\" <{$values['emailaddress']}>");

     // Replace with actual page or redirect :P
    echo "<html><head><title>Thank you!</title></head><body>Thank
you!</body></html>";

--- End Message ---
--- Begin Message ---
Hello,

This is not strictly a PHP question, though i do think some members that
subscribe to this list might be able to answer this question.

Is there an open source website flowchart and wireframe software.  My
google searches are not quite pulling up what I'm looking for.

I would like a piece of software that let's me layout the wireframes for
various pages of a site.  I would like to create a unique number for
each page.  On each wireframe, next to the links on that page, I would
like to reference the destination of that link by the unique number of
the page to which it is directed.  When I'm all done with the
wireframes, I would like the software to create a flowchart for the site.

Other than the above, I'm looking for a very simple piece of software.
Any ideas?

Thanks in advance,
dK
`

--- End Message ---
--- Begin Message ---
Hi.

I'm trying to help a friend with a CentOS setup.

He's installed PHP and SOAP using yum install php-soap and he is
having problems.

I assisted in the developed the php script he is using and it is
working fine on Windows.

In testing, we can do ...

# wget http://www.php.net

but not ...

# php -r "echo file_get_contents('http://www.php.net');"
PHP Warning:  file_get_contents(http://www.php.net): failed to open
stream: HTTP request failed!  in Command line code on line 1


I've checked allow_url_fopen and that is set to 1

As a test ...

# php -d allow_url_fopen=1 -r "echo file_get_contents('http://www.php.net');"
PHP Warning:  file_get_contents(http://www.php.net): failed to open
stream: HTTP request failed!  in Command line code on line 1
(This works fine on windows system)

# php -d allow_url_fopen=0 -r "echo file_get_contents('http://www.php.net');"
PHP Warning:  file_get_contents(): URL file-access is disabled in the
server configuration in Command line code on line 1
PHP Warning:  file_get_contents(http://www.php.net): failed to open
stream: no suitable wrapper could be found in Command line code on
line 1

Neither will actually return the contents.

Considering wget works and PHP doesn't _AND_ that this is linux, I'm lost.

Wireshark shoes no communication at all when PHP is used to try and
get to www.php.net, but it does show everything accurately when using
wget.

I've got the output of php -i and of the debug data from wget.

So. Any pointers, suggestions, things to read/try/etc.

Regards,

Richard.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--- End Message ---

Reply via email to