|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 12 Feb 2007 12:44:10 -0000 Issue 4622
php-general-digest-help
lists.php.net
Date: Mon Feb 12 2007 - 06:44:10 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 12 Feb 2007 12:44:10 -0000 Issue 4622
Topics (messages 248739 through 248751):
Re: Pasar varialbe sin GET
248739 by: Anuack Luna
248743 by: Satyam
Re: Recommend a PHP Framework
248740 by: Yong Kwang Goh
Re: Http Client in PHP connecting to a Digest authenticated server
248741 by: Manish Marathe
248746 by: Manuel Lemos
[re]crazy time with str_replace()
248742 by: jekillen
[PHP 5.0] save HTML form to .php file
248744 by: Chris Henderson
248745 by: Németh Zoltán
Beginner Questions regarding Mail and Forms
248747 by: Matthias S.
248748 by: Németh Zoltán
insert html into php variable
248749 by: Ross
248750 by: Edward Kay
248751 by: Robert Cummings
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Disculpa. Por casualidad no tienes una Web donde explique como hacerlo
fácilmente
He visto varias, pero no entiendo nada
Le agradezco
Saludos desde Colombia
""Anuack Luna"" <anuack
gmail.com> escribió en el mensaje
news:03.FF.22659.6E1EEC54
pb1.pair.com...
> Hola a todos. PHP
>
> Bueno, mi consulta es complicada
>
> Normalmente se pasa una variable así:
>
> nombredelarchivo.php?valor=variable
> nombredelarchivo.php?id=x
>
> La pagina nombredelarchivo.php recibe la variable de la otra Web page
>
> Hasta hay nop broblem
>
> He visto en los portales como por ejemplo crean un solo archivo para
> imprimir un valor como si fuera una carpeta.
>
> Ejemplo:
>
> pagina/usuari_1
> pagina/usuari_2
> pagina/anuack
> pagina/lolita.
>
> Para mi seria lógico que en donde dice anuack es una carpeta... NO???
>
> He visto nombre de archivos {name}.php pero no encuentro como lleva un
valor
> y convierte a {name}.php en anuack, lolita, usuario... etc.
>
> Como envía un valor o variable a {name}.php y como la recibe {name}.php
si
> por método GET no funciona????
>
> También he probado en variable de formulario, cookie, variable de sección
> "Algo ilógico pero lo probé", variable de servidor y valor introducido y
> nada de nada
>
> Claro, puedo hacer que me imprima por ejemplo 18.php, pero no encuentra el
> archivo.
>
> Alguna información clara en español.
>
> Espero haberme explicado
attached mail follows:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
----- Original Message -----
From: "Anuack Luna" <anuack
gmail.com>
To: <php-general
lists.php.net>
Sent: Monday, February 12, 2007 2:52 AM
Subject: [PHP] Re: Pasar varialbe sin GET
> Disculpa. Por casualidad no tienes una Web donde explique como hacerlo
> fácilmente
>
> He visto varias, pero no entiendo nada
>
> Le agradezco
>
> Saludos desde Colombia
> ""Anuack Luna"" <anuack
gmail.com> escribió en el mensaje
> news:03.FF.22659.6E1EEC54
pb1.pair.com...
>> Hola a todos. PHP
>>
>> Bueno, mi consulta es complicada
>>
>> Normalmente se pasa una variable así:
>>
>> nombredelarchivo.php?valor=variable
>> nombredelarchivo.php?id=x
>>
>> La pagina nombredelarchivo.php recibe la variable de la otra Web page
>>
>> Hasta hay nop broblem
>>
>> He visto en los portales como por ejemplo crean un solo archivo para
>> imprimir un valor como si fuera una carpeta.
>>
>> Ejemplo:
>>
>> pagina/usuari_1
>> pagina/usuari_2
>> pagina/anuack
>> pagina/lolita.
>>
>> Para mi seria lógico que en donde dice anuack es una carpeta... NO???
>>
>> He visto nombre de archivos {name}.php pero no encuentro como lleva un
> valor
>> y convierte a {name}.php en anuack, lolita, usuario... etc.
>>
>> Como envía un valor o variable a {name}.php y como la recibe {name}.php
> si
>> por método GET no funciona????
>>
>> También he probado en variable de formulario, cookie, variable de sección
>> "Algo ilógico pero lo probé", variable de servidor y valor introducido y
>> nada de nada
>>
>> Claro, puedo hacer que me imprima por ejemplo 18.php, pero no encuentra
>> el
>> archivo.
>>
>> Alguna información clara en español.
>>
>> Espero haberme explicado
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi Jim,Yes I can write to local file system, but only to my home directory (document root) and subdirectories under it.Thanks for your advice. Will look into SQLite.GOH, Yong Kwang
Singapore
gohyongkwang
hotmail.com
> Date: Sat, 10 Feb 2007 22:00:34 -0800> From: lists
cmsws.com> To: gohyongkwang
hotmail.com> CC: php-general
lists.php.net> Subject: Re: [PHP] Recommend a PHP Framework> > Goh Yong Kwang wrote:> > Hi,> > > > I am now mulling over writing my PHP web application from scratch or to use > > some kind of framework to organize my code.> > > > For Java, Struts and Spring come to mind. But for PHP, there are numerous > > frameworks and I can't figure out which one to use.> > > > I would like to describe my constraints as dictated by my server setup > > (using a free hosted account, so not a lot of flexibility):> > > > * PHP 5> > * Safe mode on> > * No database (not even MySQL)> > * No shell/SSH login to run commands> > * Server running on Linux> > * Only allowed to upload my PHP files via FTP or Web browser> > * Only allowed to upload files to my account home directory, which is > > document root> > * Not allowed to tweak the PHP installation> > > > So given the above constraints, most likely I need a simple framew
ork that> > * Comes in a bunch of PHP files and classes that I can just upload together > > with my other PHP/HTML files> > * No additional configuration on the server side> > * No change required for the PHP installation such as PEAR installation, > > modification of php.ini or installation of extension> > > > Any framework that fits the constraints? Let me know.> > > > Thanks.> > ---> > Goh Yong Kwang> > Singapore> > gohyongkwang
hotmail.com> > > can you at least write to the local file system with php?> > if so, you might look at something that supports sqlite> > You could also look at running a separate server running your DB.
_________________________________________________________________
Call friends with PC-to-PC calling -- FREE
http://get.live.com/messenger/overview
attached mail follows:
On 2/10/07, Manuel Lemos <mlemos
acm.org> wrote:
>
> Hello,
>
> on 02/09/2007 04:49 PM Manish Marathe said the following:
> > Hello,
> >
> > I have seen some implementations of Server in php implementing HTTP
> Digest
> > Authentication but I have not seen any guidelines on HTTP Client
> connecting
> > to a specific host, and using the "realm", the username and password to
> get
> > authenticated and thereby do something like download files etc.
>
> Take a look at this HTTP client class:
>
> http://www.phpclasses.org/httpclient
>
> It supports Digest authentication via the SASL class library
>
> http://www.phpclasses.org/sasl
Thanks Manuel,
So I will need both the SASL library written by you and the httpclient
library? Can you throw some more light, will really appreciate that.
--
Manish Marathe
SpikeSource, Inc.
http://developer.spikesource.com
attached mail follows:
Hello,
on 02/12/2007 03:03 AM Manish Marathe said the following:
> > I have seen some implementations of Server in php implementing
> HTTP Digest
> > Authentication but I have not seen any guidelines on HTTP Client
> connecting
> > to a specific host, and using the "realm", the username and
> password to get
> > authenticated and thereby do something like download files etc.
>
> Take a look at this HTTP client class:
>
> http://www.phpclasses.org/httpclient
>
> It supports Digest authentication via the SASL class library
>
> http://www.phpclasses.org/sasl
>
>
> Thanks Manuel,
>
> So I will need both the SASL library written by you and the httpclient
> library? Can you throw some more light, will really appreciate that.
Exactly.
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
Hello;
I solved this problem, I think. It is the only thing I could find
different between
two other wise identical strings in two php files with identical names
(in different
dirs). One was formatted for Unix (linefeed line ending) and the one,
that was
not responding, was formatted for Mac (carriage return line endings).
I have not
tried it yet but I believe that will solve the problem.
Perhaps this will help someone with a similar problem they cannot seem
to solve.
JK
Addenda:
sorry, this message seems to have been placed in my drafts dir instead
of being
sent. Here it is.
attached mail follows:
My HTML form submits data to a php form and the php form displays it.
I was wondering if I could "save" the data in the php form so whoever
opens it can see the data. At the moment, if I open "action.php" from
a different computer or browser I see "hi you are 0 years old"
Here's my HTML & PHP form -
<html>
<head> </head>
<title> Form </title>
<body>
<form action="action.php" method="post">
<p> your name: <input type="text" name="name" /> </p>
<p> your age: <input type="text" name="age" /> </p>
<p> <input type="submit" /> </p>
</form>
</body>
</html>
PHP form -
hi <?php echo htmlspecialchars($_POST['name']); ?>
you are <?php echo (int)$_POST['age']; ?> years old
Thanks.
attached mail follows:
On h, 2007-02-12 at 21:04 +1100, Chris Henderson wrote:
> My HTML form submits data to a php form and the php form displays it.
> I was wondering if I could "save" the data in the php form so whoever
> opens it can see the data. At the moment, if I open "action.php" from
> a different computer or browser I see "hi you are 0 years old"
you have to store the data somewhere
- a DB
- a separate file
- or even you could rewrite the original "action.php" file but that
seems very messy to me
greets
Zoltán Németh
>
> Here's my HTML & PHP form -
>
> <html>
>
> <head> </head>
>
> <title> Form </title>
>
> <body>
>
> <form action="action.php" method="post">
> <p> your name: <input type="text" name="name" /> </p>
> <p> your age: <input type="text" name="age" /> </p>
> <p> <input type="submit" /> </p>
> </form>
> </body>
> </html>
>
> PHP form -
>
> hi <?php echo htmlspecialchars($_POST['name']); ?>
> you are <?php echo (int)$_POST['age']; ?> years old
>
> Thanks.
>
attached mail follows:
Hi there,
I've got two bloody beginner questions: I've created a form with various
text input fields. One is to hold a numeric value (age). Upon submission, I
try to retrieve the value of this field like this:
$age = $_POST['_txtAge'];
later, I use the $age variable to create a message...
$message = "Name: " . $name . "\n";
$message .= "Email: " .$email . "\n";
$message .= "Age: " . $age . "\n";
$message .= "Gender: " . $gender . "\n";
$message .= "Info: " . $info;
.... then I send the message:
mail("bla
bla.com", "A Request", $message, _getMailHeaders($name, §email));
Now on to my questions:
$message contains the values of all fields correctly except the age field
(input of all others are alphabetic, only age has numeric content). Why is
this?
Secondly, mail sends my message correctly. But the return adresse set in
_getMailHeaders is not used. Instead, some identification from the server is
used. Why is that?
Here the function _getMailHeaders:
function _getMailHeaders($senderName, $senderAddress) {
ini_set(sendmail_from, $senderAddress);
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Reply-To: ' . $senderName .'<'. $senderAddress. '>' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: PostOffice <postoffice
barkatdogs.com>' . "\r\n";
$headers .= 'From: ' . $senderName . '<' . $senderAddress . '>' . "\r\n";
ini_restore(sendmail_from);
return $headers;
}
Any help is greatly appreceated.
Matthias
attached mail follows:
On h, 2007-02-12 at 11:13 +0100, Matthias S. wrote:
> Hi there,
>
> I've got two bloody beginner questions: I've created a form with various
> text input fields. One is to hold a numeric value (age). Upon submission, I
> try to retrieve the value of this field like this:
>
> $age = $_POST['_txtAge'];
>
> later, I use the $age variable to create a message...
>
> $message = "Name: " . $name . "\n";
> $message .= "Email: " .$email . "\n";
> $message .= "Age: " . $age . "\n";
> $message .= "Gender: " . $gender . "\n";
> $message .= "Info: " . $info;
>
> .... then I send the message:
>
> mail("bla
bla.com", "A Request", $message, _getMailHeaders($name, email));
>
> Now on to my questions:
> $message contains the values of all fields correctly except the age field
> (input of all others are alphabetic, only age has numeric content). Why is
> this?
what do you mean by incorrect? what is the test input you give and what
result do you get?
>
> Secondly, mail sends my message correctly. But the return adresse set in
> _getMailHeaders is not used. Instead, some identification from the server is
> used. Why is that?
it is (if you use sendmail on the server) because sendmail sets reply-to
to the user running it by default. so it gets set to the user the script
runs as (usually www-data or something like that). it can be overridden
by the "-f" switch I think. like this:
mail($to, $subject, $message, $headers, "-f".$frommail);
hope that helps
Zoltán Németh
>
> Here the function _getMailHeaders:
>
> function _getMailHeaders($senderName, $senderAddress) {
>
> ini_set(sendmail_from, $senderAddress);
>
> $headers = 'MIME-Version: 1.0' . "\r\n";
> $headers .= 'Reply-To: ' . $senderName .'<'. $senderAddress. '>' . "\r\n";
> $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
> $headers .= 'To: PostOffice <postoffice
barkatdogs.com>' . "\r\n";
> $headers .= 'From: ' . $senderName . '<' . $senderAddress . '>' . "\r\n";
>
> ini_restore(sendmail_from);
> return $headers;
> }
>
> Any help is greatly appreceated.
>
> Matthias
>
attached mail follows:
I am using phpmailer for a rich html mailer and I have been using lines like
this to build up the mailbody
$mail_body .= "<div align=\"center\"><img
src=\"http://www.myurl.org/mylogo.gif\";
Is there a build in function to assign html code to a php variable and then
output them? Or can I read an external php file into a variable?
<div id="container">
div id="content-top">thsi is some content</div>
<div id="content-middle">
<div id="logos"></div>
<div id="content-bottom">
</div>
many thanks,
R.
attached mail follows:
> I am using phpmailer for a rich html mailer and I have been using
> lines like
> this to build up the mailbody
>
> $mail_body .= "<div align=\"center\"><img
> src=\"http://www.myurl.org/mylogo.gif\";
>
> Is there a build in function to assign html code to a php
> variable and then
> output them? Or can I read an external php file into a variable?
>
Have a look at the heredoc syntax for declaring strings:
http://uk.php.net/manual/en/language.types.string.php#language.types.string.
syntax.heredoc
I find it really useful for these situations.
Edward
attached mail follows:
On Mon, 2007-02-12 at 12:27 +0000, Edward Kay wrote:
> > I am using phpmailer for a rich html mailer and I have been using
> > lines like
> > this to build up the mailbody
> >
> > $mail_body .= "<div align=\"center\"><img
> > src=\"http://www.myurl.org/mylogo.gif\";
> >
> > Is there a build in function to assign html code to a php
> > variable and then
> > output them? Or can I read an external php file into a variable?
> >
>
> Have a look at the heredoc syntax for declaring strings:
> http://uk.php.net/manual/en/language.types.string.php#language.types.string.
> syntax.heredoc
>
> I find it really useful for these situations.
I think, from his post, he'd be better with output buffering:
<?php
ob_start();
include( 'someFile.php' );
$content = ob_get_contents();
ob_end_clean();
?>
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]