php-general Digest 12 Feb 2007 00:41:50 -0000 Issue 4621
Topics (messages 248733 through 248738):
Re: PHP or Bridge (card game)
248733 by: tedd
Re: Pasar varialbe sin GET
248734 by: Oscar Gosdinski
Re: Please critique my database class.
248735 by: Martin Marques
Re: un include?
248736 by: Larry Garfield
248738 by: jekillen
Re: Recommend a PHP Framework
248737 by: Chris
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 ---
At 1:19 PM -0800 2/10/07, pub wrote:
To all PHP experts,
Do any of you also know how to play bridge?
I'm sure someone does.
If yes, which do you think is harder to learn, PHP or bridge?
I don't know, I don't play bridge.
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
Revisa las directivas RewriteEngine, RewriteRule de Apache.
Por cierto, esta es una lista en inglés.
Review the Apache directives: RewriteEngine, RewriteRule.
BTW, this is an english list.
On 2/11/07, Anuack Luna <[EMAIL PROTECTED]> wrote:
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.
--
Saludos
Oscar
--- End Message ---
--- Begin Message ---
barophobia escribió:
Hi!
I was thinking about asking for recommendations for a lightweight database
class. But I realized I hadn't thought much about what my requirements are
so I decided instead to ask the list to critique my own class. I don't need
anything as robust as ADOdb and I always use MySQL.
Why not use MDB2?
--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
---------------------------------------------------------
Martín Marqués | Programador, DBA
Centro de Telemática | Administrador
Universidad Nacional
del Litoral
---------------------------------------------------------
--- End Message ---
--- Begin Message ---
Copying back to the list where it belongs...
On Sunday 11 February 2007 11:01 am, jekillen wrote:
> On Feb 10, 2007, at 8:58 PM, Larry Garfield wrote:
> > You need to rearchitect your system.
> >
> > When you include a file, its code executes. Once it has been
> > executed, it is
> > done. It will never "rewind" itself. You can open and edit the file,
> > but
> > the code has already executed and that execution has happened, and you
> > cannot
> > change that.
> >
> > What exactly are you trying to accomplish? Dollars to donuts there's
> > a much
> > easier and more logical way than trying to edit an included file.
>
> Thanks for the reply. It is good to understand what you are telling me
> here.
> I was concerned that the file would not be accessible by a call to
> fopen when
> it has been included. It is just a series of configuration variables
> that are set
> and I want the user to be able to change one of these variables' values.
> What turned up was that I was referencing the variable by the wrong
> name in a str_replace call.
> thanks again
> JK
You're using str_replace() on PHP code to control configuration variables?
There's a half dozen better ways that are less error prone and faster and
more secure.
My recommendation:
- If the config is all simple values, use an ini file. You can then use
parse_ini_file() to read the data into an array that you can reference, and
can write the array back out easily. (Ini is a very simple format.)
- If you want it to be programmatically editable, put it in your database and
be done with it. A simple key/value table with a getter function and setter
function is trivial to setup, but far more robust and flexible than messing
around with the file system.
--
Larry Garfield AIM: LOLG42
[EMAIL PROTECTED] ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
--- End Message ---
--- Begin Message ---
On Feb 11, 2007, at 1:16 PM, Larry Garfield wrote:
You're using str_replace() on PHP code to control configuration
variables?
There's a half dozen better ways that are less error prone and faster
and
more secure.
My recommendation:
- If the config is all simple values, use an ini file. You can then
use
parse_ini_file() to read the data into an array that you can
reference, and
can write the array back out easily. (Ini is a very simple format.)
- If you want it to be programmatically editable, put it in your
database and
be done with it. A simple key/value table with a getter function and
setter
function is trivial to setup, but far more robust and flexible than
messing
around with the file system.
Thank you for your suggestions.
I am writing a web based app that creates packages for registered
users. Each user has a user space created for them on the server.
It consists of a directory with files and subdirs and files. Each
package
is uniform. The only thing that personalizes each user space is the
user space directory name and the config file in that user space.
This config file does not effect any other users space. So an ini file
with globally set variables is completely out of the question. At
present
I am not using any databases in this context. There are other security
measures I have in place for this. One is that the user must login and
all transactions with the server are done over ssl. Every page request
is authenticated (not by re entering id/pw). And a few other tricks.
Thanks again.
Jeff K
--- End Message ---
--- Begin Message ---
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):
<snip snip snip>
Search the archives, this has been discussed a lot:
http://marc.theaimsgroup.com/?l=php-general
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---