Re: [PHP] validate querystring

2002-12-11 Thread Brad Bulger
you could try doing $realfilename = realpath($fname); if (strpos($realfilename, $the_valid_path_to_my_file_directory) !== 0) { // bad file name, like /etc/passwd } elseif (is_dir($realfilename)) { // bad user looking at directory } On Thu, 12 Dec 2002, Dara Dowd wrote: > Hello,

Re: [PHP] Using fopen() to open a php file with variables.

2002-12-11 Thread Brad Bulger
if you have URL wrappers enabled, do $fp = fopen("http://path/to/your/file/$calendar_file";, 'r'); On Wed, 11 Dec 2002, Jay (PHP List) wrote: > Okay, I need to retrieve the output of a php file with variables being > passed to it. Example: > > $calendar_file = "make_calendar.php3?month=$month&

[PHP] fsockopen() to ssl port gets protocol error

2002-11-12 Thread Brad Bulger
i'm doing a POST to an https server using fsockopen(). after doing the writes, i do fread($fp, 4096) until feof($fp) returns true. this seems to work fine, except that i get an SSL protocol error on the last read. can anybody with a better understanding of this give me an idea why that's happenin

Re: [PHP] An small SQL problem

2002-10-12 Thread Brad Bulger
what database are you using? because the answer is different, depending. on postgres, for example, which supports subselects, you can do select * from TableA where FieldA1 not in (select FieldB2 from TableB) with mysql, there are no subselects, so you'd have to do something like select TableA

[PHP] ZE2 nested classes question

2002-10-08 Thread Brad Bulger
Question about a change coming in PHP 5 / ZendEngine2 : I'm not clear on exactly why you would want to nest class definitions, especially if the proposed change to namespace handling goes away - i.e. you still have to do $this->otherclassfunc() inside a class function, instead of just otherclassf

Re: [PHP] php string match problem

2002-08-18 Thread Brad Bulger
have you tried printing them out with surrounding characters, like echo 'row8=(',$row[8],') LOGINNAME=(',$LOGINNAME,')'; to see if there are leading or trailing spaces? On Mon, 19 Aug 2002, Pafo wrote: > heh,, is it just me or can anyone see whats wrong with this code... > > $query = "SELECT

RE: [PHP] Re: Trying to delete

2002-08-13 Thread Brad Bulger
On Wed, 14 Aug 2002, [iso-8859-1] César Aracena wrote: > Thanks. I must apology as I made a mistake when writing the incoming > variable's name. I had it wrong so it would pass the variable but the > incoming script was looking for a variable that wasn't passed. In the > meantime, and now that I

Re: [PHP] mysql error

2002-08-13 Thread Brad Bulger
it's the WHERE clause, it's illegal there. what are you trying to do? if you want to change the heading & paragraph columns of every row in malibu_data where the page_name & par_id match your values, this should be an UPDATE. if you want to create a new record in malibu_data for every record th

[PHP] abstract question

2002-08-13 Thread Brad Bulger
If you aren't supposed to be able to use func_get_args() as a function parameter, but you can get away with it if you make it the *first* param, is that a bug or a feature? works: funcy(func_get_args(), 'p1', 3); fatal error: funcy('p1', 3, func_get_args()); i assume this works