You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
(57) |
May
(287) |
Jun
(166) |
Jul
(286) |
Aug
(273) |
Sep
(254) |
Oct
(144) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Andreas A. <a.a...@th...> - 2001-08-27 12:38:53
|
Hi Alex, sorry, maybe I was a bit too fast when I inspected the files (I visited the wrong one). The output generated for a page is actually unusable. The Keyless module arrays in page are normally translated to the "container-format" we apply also to datasources/queries/lang: load => array( array(modulefoo), array(modulebar), ... ); With Andris' latest files I get a structure like this: load => array( 'module' => array( modulefoodata ) ); This does not work, 'caus onyl the last module entry of the pagedef is in the generated page (the key module is sequently overwritten). Andi > -----Original Message----- > From: bin...@li... > [mailto:bin...@li...]On Behalf Of alex > black > Sent: Montag, 27. August 2001 00:28 > To: bin...@li... > Subject: Re: [binarycloud-dev] bye-bye [xm2php] > > > I need to look at this, but I'm willing to bet that I'll agree. > > I'll probably commit a changed version of Page on monday. > > _a > > ----- Original Message ----- > From: "Andreas Aderhold" <a.a...@th...> > > > Hi Andris, > > > > Hmm. But the output looks more clear to me. I think it's worth changing > > Page. > > > > Hopefully see you soon. Good luck with your move. > > > > Andi > > > > > xml2php now uses the idea from Alex to know when to > > > generate keyless arrays(the version before generated > > > keyless arrays if there were two array keys with the > > > same name, but it didn't work if there was only one array > > > defined). > > > _Because of this change it is necesary to change the bcp.xml page > > > definitions and the way Page processes them._ > > > > > So, > > > <langs> > > > <lang> > > > <name>Latvian</name> > > > </lang> > > > <lang> > > > <name>English</name> > > > </lang> > > > </langs> > > > > > > will become > > > > > > $langs=array( > > > array( > > > 'name' => "Latvian", > > > ), > > > array( > > > 'name' => "English", > > > ), > > > ); > > > |
From: Gerry K. <ge...@mc...> - 2001-08-27 03:50:58
|
At 03:26 PM 26/08/01 -0700, you wrote: > > So, I've got all this wonderful source. I did a make, as stated in the > > install file, but now I'm not sure what to do. I'd like to try using it, > > but I'm not sure where to start. > >Well, what do you want to do/build? For now, I'd be happy just to render some pages without a db back-end, and then try displaying data from MySQL, using authentication, updating data... Gerry >_a |
From: alex b. <en...@tu...> - 2001-08-26 22:31:19
|
I need to look at this, but I'm willing to bet that I'll agree. I'll probably commit a changed version of Page on monday. _a ----- Original Message ----- From: "Andreas Aderhold" <a.a...@th...> To: <bin...@li...> Sent: Sunday, August 26, 2001 5:19 AM Subject: RE: [binarycloud-dev] bye-bye [xm2php] > Hi Andris, > > Hmm. But the output looks more clear to me. I think it's worth changing > Page. > > Hopefully see you soon. Good luck with your move. > > Andi > > > xml2php now uses the idea from Alex to know when to > > generate keyless arrays(the version before generated > > keyless arrays if there were two array keys with the > > same name, but it didn't work if there was only one array > > defined). > > _Because of this change it is necesary to change the bcp.xml page > > definitions and the way Page processes them._ > > > So, > > <langs> > > <lang> > > <name>Latvian</name> > > </lang> > > <lang> > > <name>English</name> > > </lang> > > </langs> > > > > will become > > > > $langs=array( > > array( > > 'name' => "Latvian", > > ), > > array( > > 'name' => "English", > > ), > > ); > > > > > Over and out, > > Andris Spruds > > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: alex b. <en...@tu...> - 2001-08-26 22:30:28
|
actually it's called PHPRC and it's in my ENV. I'll change all the code and instructions. good point. ----- Original Message ----- From: "Andreas Aderhold" <a.a...@th...> To: <bin...@li...> Sent: Sunday, August 26, 2001 5:09 AM Subject: RE: [binarycloud-dev] make errors with xml2php > Hi Alex, > > That's how I would do it: > > 1: > We use a unix standard location for the shell interpreter > i.e. #!/usr/bin/php (creating a symlink isn't that hard, but only needed for > debugging purposes, see below) > > 2: > For the make process we introduce an new variable in > Makefile.in that is determined by a configure script i.e: > > PHPCMD= "{by configure determined location}" > > (after configure e.g. PHPCMD="/usr/local/bin/php -q") > > in Makefiles that use command line php we just use > this syntax: > > @$(PHPCMD) $(XML2PHP) ... options etcpp > > pros: > - the php command is in a single place > - configure don't has to modify all php shell scripts > - Actually we could leave out the #! line and with some mods > the scripts could be "incldable" and used through the web > (maybe we need this later => builing triggerd via an > admin interface or whatever might be useful in the future). > > > Andi > > > >> 3) We should find a way to have a the interpreter > >> line in the php files more flexible through the > >> different platforms. Perl has a trick to do so > >> eval 'exec perl -S $0 "$@"' > > > > agreed, I was going to suggest a simple ./configure.sh which > > would do a grep for a php command line key. > > > > any other ideas? > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: alex b. <en...@tu...> - 2001-08-26 22:29:33
|
> Wow. I did my first-ever CVS download last week. Kuel. Do you remember your > first time? better than... er, maybe not. yes, actually, though it was establishing a cvs repository for my company's projects. I now pray daily before the CVS god. > So, I've got all this wonderful source. I did a make, as stated in the > install file, but now I'm not sure what to do. I'd like to try using it, > but I'm not sure where to start. Well, what do you want to do/build? _a |
From: Andreas A. <a.a...@th...> - 2001-08-26 12:35:40
|
Hi Andris, Hmm. But the output looks more clear to me. I think it's worth changing Page. Hopefully see you soon. Good luck with your move. Andi > xml2php now uses the idea from Alex to know when to > generate keyless arrays(the version before generated > keyless arrays if there were two array keys with the > same name, but it didn't work if there was only one array > defined). > _Because of this change it is necesary to change the bcp.xml page > definitions and the way Page processes them._ > So, > <langs> > <lang> > <name>Latvian</name> > </lang> > <lang> > <name>English</name> > </lang> > </langs> > > will become > > $langs=array( > array( > 'name' => "Latvian", > ), > array( > 'name' => "English", > ), > ); > > Over and out, > Andris Spruds |
From: Andreas A. <a.a...@th...> - 2001-08-26 12:35:19
|
Hi Gerry, the most important point is to understand the page render pipeline, I think. Have a look at the htdocs files in binarycloud/users/htdocs. Then you should pick a module loaded in load-section of a page and visit the source of the module in users/mod/name. Then have a look at the presentation stuff. Module output is wrapped in html. This is done via templates declared in the page file and defined in user/tmpl/html. Once you got a picture of how a page is generated it will become easy to write modules etc. At least the specs might be interesting too: binarycloud/docs/specs/ If something is not clear just ask. Andi > -----Original Message----- > Wow. I did my first-ever CVS download last week. Kuel. Do you > remember your > first time? > > So, I've got all this wonderful source. I did a make, as stated in the > install file, but now I'm not sure what to do. I'd like to try using it, > but I'm not sure where to start. > > Regards, > Gerry > |
From: Andreas A. <a.a...@th...> - 2001-08-26 12:09:46
|
Hi Alex, That's how I would do it: 1: We use a unix standard location for the shell interpreter i.e. #!/usr/bin/php (creating a symlink isn't that hard, but only needed for debugging purposes, see below) 2: For the make process we introduce an new variable in Makefile.in that is determined by a configure script i.e: PHPCMD= "{by configure determined location}" (after configure e.g. PHPCMD="/usr/local/bin/php -q") in Makefiles that use command line php we just use this syntax: @$(PHPCMD) $(XML2PHP) ... options etcpp pros: - the php command is in a single place - configure don't has to modify all php shell scripts - Actually we could leave out the #! line and with some mods the scripts could be "incldable" and used through the web (maybe we need this later => builing triggerd via an admin interface or whatever might be useful in the future). Andi >> 3) We should find a way to have a the interpreter >> line in the php files more flexible through the >> different platforms. Perl has a trick to do so >> eval 'exec perl -S $0 "$@"' > > agreed, I was going to suggest a simple ./configure.sh which > would do a grep for a php command line key. > > any other ideas? |
From: Gerry K. <ge...@mc...> - 2001-08-26 11:50:59
|
Wow. I did my first-ever CVS download last week. Kuel. Do you remember your first time? So, I've got all this wonderful source. I did a make, as stated in the install file, but now I'm not sure what to do. I'd like to try using it, but I'm not sure where to start. Regards, Gerry |
From: Andreas A. <a.a...@th...> - 2001-08-26 11:27:26
|
I modified datasources/query definitions, revised and commited the following files. Here we go: [/r2/binarycloud/user/conf/Datasources.xml.php/Datasources.php] - slight format changes too be consistent with lang, query etc - changed "Case" of metabase specific tags. i.e "IncludePath" instead of "includepath" - changed tag <database_name> to <database> [/r2/binarycloud/base/mgr/QueryManager.php] - general - changed 'QUERY' and 'ARGTYPES' records in query statements to lowercase to work with xml2php output - method PrepareConnection() - added proper support for datasources format - added support for "default" datasource used if no datasource name is supplied via init (i.e. missing in pagedef) - method _ProcessResult() - added strtolower for column-names in resultbuffer - method _LoadQueries() - changed method to support to load queries in query definition format [/r2/binarycloud/user/mod/query_example/*] - changed example and schemas to new conventions should work with oracle and mysql now - added qry/ directory and example query definitons - added demonstration of queryloading in example [/r2/binarycloud/user/htdocs/query_example.xml.php] - added xml page definition for query example [/r2/binarycloud/docs/specs/xml/datasources.xml] - documented changes Andi |
From: alex b. <en...@tu...> - 2001-08-26 01:02:05
|
> Re: HTML builders > > disclaimer: I just wanted to throw this out, as I have not extensively > researched the possibilities much. > > I noticed that TableBuilder wasn't listed in the latest source tree > listing. This may be a good time to discuss how indepth these builders > will/can be. Question 1, what is the requirement for the need of a > builder? The builders you mentioned here all (?) seem to work hand/hand > with other parts of the bc core. (ex: formBuilder uses entityManager) > Is there a place for builders that merely simplifies the HTML rendering? > (ie: tableBuilder, headerBuilder, ...) Table builder has been "renamed" to listbuilder, because it will take care of any ordered list of data, from a <ul> up to a big, complex table. > There is a WOW pretty neat set of classes by Walt A. Boring IV called > phpHtmlLib (http://phphtmllib.sourceforge.net/) which does just this. > One nice feature this project has is the ability to specify HTML 4.0 or > XHTML when you render your page. I think i've seen this, and to be honest I've never had much use for html abstraction, except for things like <input> etc. In some case, advanced tools are necessary (like ListBuilder, FormBuilder). You are of course welcome to use that lib (the code lookged good to me..) for anything you do. > I'm not suggesting that we integrated it into binarycloud; I simply was > checking it out when I started questioning how extensive the binarycloud > builders will be. Well, the builder's won't ingetrate any html, they'll use default 'external' templates. Really a builder manages taking a set of data or metadata and turning it into a useable 'definition' of a bit of presentation. _a > jason > > > > FormBuilder > > ListBuilder > > WizardBuilder > > TreeBuilder > > CalendarBuilder > > EmailBuilder > > FaxBuilder > > PDFBuilder > > PageDefBuilder > > .... suggestions here? > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: jason <ja...@gr...> - 2001-08-25 23:19:11
|
Re: HTML builders disclaimer: I just wanted to throw this out, as I have not extensively researched the possibilities much. I noticed that TableBuilder wasn't listed in the latest source tree listing. This may be a good time to discuss how indepth these builders will/can be. Question 1, what is the requirement for the need of a builder? The builders you mentioned here all (?) seem to work hand/hand with other parts of the bc core. (ex: formBuilder uses entityManager) Is there a place for builders that merely simplifies the HTML rendering? (ie: tableBuilder, headerBuilder, ...) There is a WOW pretty neat set of classes by Walt A. Boring IV called phpHtmlLib (http://phphtmllib.sourceforge.net/) which does just this. One nice feature this project has is the ability to specify HTML 4.0 or XHTML when you render your page. I'm not suggesting that we integrated it into binarycloud; I simply was checking it out when I started questioning how extensive the binarycloud builders will be. jason > FormBuilder > ListBuilder > WizardBuilder > TreeBuilder > CalendarBuilder > EmailBuilder > FaxBuilder > PDFBuilder > PageDefBuilder > .... suggestions here? |
From: alex b. <en...@tu...> - 2001-08-25 21:37:33
|
same as on -general, looks great, commit away :) _a ----- Original Message ----- From: "Andreas Aderhold" <a.a...@th...> To: "Bcdev" <bin...@li...> Cc: "bcgeneral" <bin...@li...> Sent: Saturday, August 25, 2001 5:34 AM Subject: [binarycloud-dev] Datasources, Queries > Hi All, > > i've made some changes to the datasources/qry format (to match each other > and with lang)as well as implementing proper query loading. If you all > concur I'll commit the files. > > Andi > > -- > > =================================================== > Datasources.php.xml > --------------------------------------------------- > <datasources> > <datasource> > <name>dummy</name> > <default>false</default> > <database>test</database> > </datasource> > <datasource> > <name>query_example</name> > <default>true</default> > <database>test</database> > <Type>mysql</Type> > <Host>localhost</Host> > <User>root</User> > <Password>sql</Password> > <IncludePath>BC_PATH."ext/metabase"</IncludePath> > <Persistent>true</Persistent> > </datasource> > </datasources> > > --------------------------------------------------- > will result in Datasources.php > --------------------------------------------------- > <?php > global $QueryManager; > $QueryManager->datasources = array( > array( > 'name' => "dummy", > 'default' => false, > 'database' => "test", > ), > array( > 'name' => "query_example", > 'default' => true, > 'database' => "test", > 'Type' => "mysql", > 'Host' => "localhost", > 'User' => "root", > 'Password' => "sql", > 'IncludePath' => BC_PATH."ext/metabase", > 'Persistent' => true, > ), > ); > > =================================================== > Something.qry.xml > --------------------------------------------------- > <queries> > <query> > <name>user.news.tinylist</name> > <sql>SELECT newsid, date, title FROM news ORDER BY date DESC</sql> > </query> > <query> > <name>user.news.newsbyid</name> > <sql>SELECT a.title, b.login, a.date, a.news FROM news a, users b WHERE > a.userId = b.userId AND newsId = ?</sql> > <argtypes> > <type>integer</type> > </argtypes> > </query> > </queries> > > --------------------------------------------------- > will result in "Something.php", I guess: > --------------------------------------------------- > <?php > global $QueryManager; > $queries = array( > array( > 'name' => "user.news.tinylist", > 'sql' => "SELECT newsid, date, title FROM news ORDER BY date DESC", > ), > array( > 'name' => "user.news.newsbyid", > 'sql' => "SELECT a.title, b.login, a.date, a.news FROM news a, users b > WHERE a.userId = b.userId AND newsId = ?", > 'argtypes' => array('integer'), > ), > ); > > $QueryManager->LoadQueries($queries); > unset($queries); > ?> > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: alex b. <en...@tu...> - 2001-08-25 21:33:45
|
> I'm moving to the university, so until I get into the new flat and get a new > internet connection and buy a new computer, etc. I'm going to be offline. > > Howerver, I feel I should leave things in order, so here's the latest > version of xmltphp (sorry for sending the files to the list again, didn't > have any time to play with CVS). > > xml2php now uses the idea from Alex to know when to generate keyless > arrays(the version before generated keyless arrays if there were two array > keys with the same name, but it didn't work if there was only one array > defined). > _Because of this change it is necesary to change the bcp.xml page > definitions and the way Page processes them._ Got it, thanks for all your work andris, hope your move goes well. -a > > So, > <langs> > <lang> > <name>Latvian</name> > </lang> > <lang> > <name>English</name> > </lang> > </langs> > > will become > > $langs=array( > array( > 'name' => "Latvian", > ), > array( > 'name' => "English", > ), > ); > > > Over and out, > Andris Spruds |
From: Andris S. <an...@do...> - 2001-08-25 12:50:03
|
I'm moving to the university, so until I get into the new flat and get a new internet connection and buy a new computer, etc. I'm going to be offline. Howerver, I feel I should leave things in order, so here's the latest version of xmltphp (sorry for sending the files to the list again, didn't have any time to play with CVS). xml2php now uses the idea from Alex to know when to generate keyless arrays(the version before generated keyless arrays if there were two array keys with the same name, but it didn't work if there was only one array defined). _Because of this change it is necesary to change the bcp.xml page definitions and the way Page processes them._ So, <langs> <lang> <name>Latvian</name> </lang> <lang> <name>English</name> </lang> </langs> will become $langs=array( array( 'name' => "Latvian", ), array( 'name' => "English", ), ); Over and out, Andris Spruds |
From: Andreas A. <a.a...@th...> - 2001-08-25 12:39:04
|
Hi All, i've made some changes to the datasources/qry format (to match each other and with lang)as well as implementing proper query loading. If you all concur I'll commit the files. Andi -- =================================================== Datasources.php.xml --------------------------------------------------- <datasources> <datasource> <name>dummy</name> <default>false</default> <database>test</database> </datasource> <datasource> <name>query_example</name> <default>true</default> <database>test</database> <Type>mysql</Type> <Host>localhost</Host> <User>root</User> <Password>sql</Password> <IncludePath>BC_PATH."ext/metabase"</IncludePath> <Persistent>true</Persistent> </datasource> </datasources> --------------------------------------------------- will result in Datasources.php --------------------------------------------------- <?php global $QueryManager; $QueryManager->datasources = array( array( 'name' => "dummy", 'default' => false, 'database' => "test", ), array( 'name' => "query_example", 'default' => true, 'database' => "test", 'Type' => "mysql", 'Host' => "localhost", 'User' => "root", 'Password' => "sql", 'IncludePath' => BC_PATH."ext/metabase", 'Persistent' => true, ), ); =================================================== Something.qry.xml --------------------------------------------------- <queries> <query> <name>user.news.tinylist</name> <sql>SELECT newsid, date, title FROM news ORDER BY date DESC</sql> </query> <query> <name>user.news.newsbyid</name> <sql>SELECT a.title, b.login, a.date, a.news FROM news a, users b WHERE a.userId = b.userId AND newsId = ?</sql> <argtypes> <type>integer</type> </argtypes> </query> </queries> --------------------------------------------------- will result in "Something.php", I guess: --------------------------------------------------- <?php global $QueryManager; $queries = array( array( 'name' => "user.news.tinylist", 'sql' => "SELECT newsid, date, title FROM news ORDER BY date DESC", ), array( 'name' => "user.news.newsbyid", 'sql' => "SELECT a.title, b.login, a.date, a.news FROM news a, users b WHERE a.userId = b.userId AND newsId = ?", 'argtypes' => array('integer'), ), ); $QueryManager->LoadQueries($queries); unset($queries); ?> |
From: Alex B. <en...@tu...> - 2001-08-24 19:23:43
|
> Hi Alex, > >>>> prepend.php is replicated over all dirctories, i guess. >>> Alex, what do u think? >> We're going to have to use BC_PATH_HTDOCS to do the include from now on. >> But that's set in user constants, so all should be well :) > > ??? I thought the user constants are loaded with the init process, init > reqires BC_PATH and init is importet by import() that is provided by > ./prepend.php. So how should BC_PATH_HTDOCS work without init. Or am i > missing something? > > Andi you aren't, we can set it earlier. I think that we'll end up doing something like include_once(BC_PATH."user/conf/prepend.php") or something, so we don't have to do anything special. prepend was put into htdocs by default, no by design, and I would prefer to move it out entirely. _a |
From: Andreas A. <a.a...@th...> - 2001-08-24 19:12:14
|
> I'll add this to prepend. Cool! Andi > > I've done a helper method that some of you might find usefull, > too. It's in > > global scope (non class method): |
From: Andreas A. <a.a...@th...> - 2001-08-24 19:12:05
|
Hi Alex, > >> prepend.php is replicated over all dirctories, i guess. > > Alex, what do u think? > We're going to have to use BC_PATH_HTDOCS to do the include from now on. > But that's set in user constants, so all should be well :) ??? I thought the user constants are loaded with the init process, init reqires BC_PATH and init is importet by import() that is provided by ./prepend.php. So how should BC_PATH_HTDOCS work without init. Or am i missing something? Andi |
From: Andreas A. <a.a...@th...> - 2001-08-24 19:12:05
|
Hi Alex, >>> The line $argv = $HTTP_SERVER_VARS["argv"]; should work only > >>> when the php file is executed by Apache? > > > > No, it's executed on the command line. No Webserver interaction. > > really! cool. > one would think that $HTTP_SERVER_VARS would be associated with > running php through cgi or as a module, but hey :) > _a > > > argv is just the parameter list: > > > > script.php one two three .. > > [0] = script.php > > [1] = one > > [2] = three > > ... Jepp, that's really nice. The naming is a bit misleading, but when you interpret the command line as a webserver/CGI interface everything is right again :-) Andi |
From: Alex B. <en...@tu...> - 2001-08-24 18:16:02
|
I'll add this to prepend. It looks cool.. _a > I've done a helper method that some of you might find usefull, too. It's in > global scope (non class method): > > // method extract_params {{{ > /** > * Non class method extract_params extracts the params passed to > * a module to class vars. > * Called within the constructor method of you module like: > * > * extract_params($this, $_params) > * > * It actually does the following: > * > * - copies $_params to $this->params > * - references each key of $this->params to $this->key > * > * @param object The object instance this functions should applied to > * @param array The parameter array passed to the constructor > * @return bool True/false > * @author Andreas Aderhold, an...@bi... > * @access public > */ > > function extract_params(&$_cls, $_params) { > if (!is_array($_params)) { > return; > } > $_cls->params = $_params; > foreach (array_keys($_cls->params) as $name) { > $_cls->$name =& $_cls->params[$name]; > } > } > > // }}} > > Andi > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Alex B. <en...@tu...> - 2001-08-24 18:13:56
|
yes, I'm going to try and get that done today. _a > Hi Alex, > >> Naming 'special' files for processing by make: >> --------------------- >> -Something.ent.xml = entity xml definition >> -Something.qry.xml = query xml definition >> -Something.form.xml = form xml definition >> -Something.list.xml = list xml definition > > What do you think about naming the xml.php files in sync with the above? > > Something.php.xml > > This would fit better name.whatitbecomes.filetype > > Andi > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Alex B. <en...@tu...> - 2001-08-24 18:12:09
|
>>> I'll try to commit the latest version of it all tomorrow (I'm going to >>> figure out how to commit something at all as the day before >>> yesterday was my first day with CVS). >> Cool. I'll help if you have probs. > Yup. The server said: cvs [server aborted]: "commit" requires write > access to > the repository... > >> prepend.php is replicated over all dirctories, i guess. > Alex, what do u think? We're going to have to use BC_PATH_HTDOCS to do the include from now on. But that's set in user constants, so all should be well :) >> In fact it does not work with quotes. That's a problem. I just worked > around >> it by setting IncludePath directly in QueryManager. But I don't like it. > So >> xml2php should look for BC_* and act accordingly i.e. BC_PATH."path/to/" > The latest XMLUtils does just that. > >> Another problem ist that xml2php translates structures with no more than > one >> "entry" like: > Not sure I understand what you mean, but with latest XMLUtils & xml2php > and the xml file definitions I sent to Alex, the only thing one needs to > change is passwords in datasources.php. After that, even the query_example > works. > > Andris Spruds _a |
From: Alex B. <en...@tu...> - 2001-08-24 18:11:09
|
> Hi Andris, > >>> The line $argv = $HTTP_SERVER_VARS["argv"]; should work only >>> when the php file is executed by Apache? > > No, it's executed on the command line. No Webserver interaction. really! cool. one would think that $HTTP_SERVER_VARS would be associated with running php through cgi or as a module, but hey :) _a > argv is just the parameter list: > > script.php one two three .. > [0] = script.php > [1] = one > [2] = three > ... > > Andi > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Andreas A. <a.a...@th...> - 2001-08-24 13:39:28
|
I've done a helper method that some of you might find usefull, too. It's in global scope (non class method): // method extract_params {{{ /** * Non class method extract_params extracts the params passed to * a module to class vars. * Called within the constructor method of you module like: * * extract_params($this, $_params) * * It actually does the following: * * - copies $_params to $this->params * - references each key of $this->params to $this->key * * @param object The object instance this functions should applied to * @param array The parameter array passed to the constructor * @return bool True/false * @author Andreas Aderhold, an...@bi... * @access public */ function extract_params(&$_cls, $_params) { if (!is_array($_params)) { return; } $_cls->params = $_params; foreach (array_keys($_cls->params) as $name) { $_cls->$name =& $_cls->params[$name]; } } // }}} Andi |