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,
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&
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
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
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
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
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
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
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
9 matches
Mail list logo