On Thu, 2002-02-07 at 10:47, Kevin Stone wrote:
> Unless the $eventdate coming being pulled from your database a bonified
> Unix timestamp the date() function will not work.
>
> I don't like MySQL functions so I've always used $timestamp = mktime()
> to create the timestamp. Then plug that value
On Fri, 2002-02-08 at 04:43, * R&zE: wrote:
> Hi folks,
>
> I don't know if everyone ever knew this, but I haven't been able to
> find anything about this, anywhere...
>
> odbc_execute has a very dangerous 'feature'. I would like to call it
> a bug, because someone has implemented it on purpose
On Sat, 2002-02-09 at 12:24, Nick Wilson wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi all,
> I just can't see what could possibly be wrong with my php here:
>
> $sel_db=mysql_select_db("mydb") or die
> ("could not get the bugger");
> exit;
>
> I can
On Sat, 2002-02-09 at 15:39, Manuel Ritsch wrote:
> Still doesnt' work, any ither suggestions?
Sounds like you don't have register_globals turned on. (Don't turn it
on! globals are eevviill! ;)
Try:
if ($_REQUEST['link'] == 'home') {
. . .
}
Or, if using an older (pre-4.1.0) version of PHP
On Sat, 2002-02-09 at 15:40, DL Neil wrote:
> Hi,
> Have been experimenting with the array_walk function and a little array debug print
>facility, but ran into a
> problem with nested functions. The code can be written with nested functions and
>successfully executed once; but
> when repeatedly
On Sat, 2002-02-09 at 15:54, Manuel Ritsch wrote:
> I have PHP Version 4.0.5 and register_globals turned on but it doesnt' work
> =(
Is it inside a function? If not, can you send me a copy of the
script?
Torben
> "Lars Torben Wilson" <[EMAIL PROTECT
On Sun, 2002-02-10 at 11:05, Gary wrote:
> Hi All,
> This is the first time I have had to deal with math. I have gone
> through the manual and a few books and I think I am worse off then when
> I started. Can someone give me an example of the simple math below. I
> think If I see some in code
On Mon, 2002-02-11 at 06:46, Jerry Verhoef (UGBI) wrote:
> I think you all are missing the point that *R&zE is making.
>
> The software you use/create should be bugfree and free from undocumented
> features. Otherwise security risks could occur. And ofcourse all other
In a perfect world, yes. H
On Tue, 2002-02-12 at 03:04, B. Verbeek wrote:
>
> How do I check a string for it to only contain numbers?
>
> >>
>
> if(!ereg("([0-9]+)",$string)){
>
> print "It contains characters other than numbers";
>
> }else{
>
> print "Only numbers";
>
> }
>
> <<
>
> Can anyone give
On Tue, 2002-02-12 at 12:36, SpyProductions Support Team wrote:
>
> Hhere's another humdinger of a question:
>
> I am with a hosting company that doesn't want to parse PHP in HTML files
> because they are afraid it will slow down their server(s) too much.
>
> So. I really like them and
On Tue, 2002-02-12 at 13:16, Erik Price wrote:
> Is there already a built-in function that gets the basename of the
> current file?
>
> I wrote this:
>
> function get_current_page_name()
> {
> $current_page_name = explode("/", $_SERVER['PHP_SELF']);
> $current_page_name = array_slice($c
On Tue, 2002-02-12 at 13:32, Erik Price wrote:
>
> On Tuesday, February 12, 2002, at 04:26 PM, Lars Torben Wilson wrote:
>
> > echo basename($_SERVER['PHP_SELF']);
> >
> > http://www.php.net/basename
> >
>
> Thank you Torben. Reading th
On Tue, 2002-02-12 at 13:44, Alex Shi wrote:
> Hi,
>
> I have a script need to be launched from terminal, and I want
> it to report the script's path. Because this script is required to
> be launched from command line, so those Apache env vars
> have not effect work, even $PHP_SELF don't work.
>
On Wed, 2002-02-13 at 07:19, brendan conroy wrote:
> Hi, thanks for reading this novice question, I'd be grateful if someone
> could email me and tell me if its possible to convert a string to an array
> whithout using the split[] or explode[] function, as these aren't
> appropriate for the tas
On Wed, 2002-02-13 at 09:06, Erik Price wrote:
>
> On Wednesday, February 13, 2002, at 10:19 AM, brendan conroy wrote:
>
> > Hi, thanks for reading this novice question, I'd be grateful if someone
> > could email me and tell me if its possible to convert a string to an
> > array whithout usin
On Wed, 2002-02-13 at 11:56, Rick Emery wrote:
> The if-statements are based upon values read from session variables,
> cookies, values from databases, and values for the form that was just
> submitted.
>
> So, no, there are no if-statements executed on data the user has not
> submitted.
Say wha
On Wed, 2002-02-13 at 07:34, Erik Price wrote:
>
> On Wednesday, February 13, 2002, at 09:53 AM, Rick Emery wrote:
>
> > try:
> > header("Location:
> > domain.com/errorpage.php?errorcode=".urlencode($errorcode));
First to the original question: yes, querys are allowed in Location
headers, acco
On Tue, 2002-02-12 at 17:57, Erik Price wrote:
> Sorry, I debugged it myself.
>
> Don't add extra whitespace lines after you jump out of PHP mode (for
> instance, at the end of an include file, don't have any extra lines
> after the '?> PHP-jump-out mark'. The extra lines at the bottom of the
On Wed, 2002-02-13 at 13:56, Steven Walker wrote:
> Hi,
>
> I'm having trouble setting the value of form elements using variable
> values. For example:
>
>
>
> >
>
>
> In the browser, the name field is only filled with "Steven", and drops
> off everything after the space. If I echo $
On Mon, 2002-02-11 at 00:21, * R&zE: wrote:
> I understand you try to 'protect' your own product, but you have to
> stay a bit realistic about some things. Ofcourse I check the input.
> But you know... there's absolutely nothing wrong with allowing
> quotes to be stored in the database. It's just
On Wed, 2002-02-13 at 17:38, Reuben D Budiardja wrote:
>
> Hi,
> Does anyone know how to upload file using Web Browser as the interface?
>
> I want to do a web page, where you can click on a button, and then you can
> browse the local directories of the person who are browsing the page, and
>
On Wed, 2002-02-13 at 18:26, Reuben D Budiardja wrote:
> Thanks. I follow the manual. I changed my php.ini:
> upload_tmp_dir = '/home/web/'
> which is writable by web (the user running apache/php) and restart apache.
>
> However, after I upload the file, I can't find it. When I do
> print_r($H
On Wed, 2002-02-13 at 18:53, Reuben D Budiardja wrote:
> Sorry, I meant to include those information.
>
> Here is from php.ini
>
> ; File Uploads ;
>
> file_uploads = On; Whether to allow HTTP file uploads
> upload_tmp_dir = /home/web
> upload_max_files
On Wed, 2002-02-13 at 19:18, Reuben D Budiardja wrote:
> Yes, I have. I follow the example exactly from
> http://www.php.net/manual/en/features.file-upload.php.
Well, that's the problem then. The example in the manual is buggy. :)
This was fixed in cvs earlier today, actually, but the online m
On Thu, 2002-02-14 at 07:32, Erik Price wrote:
> Hm... I tried quite a few variations on this. I can't seem to get any
> displayable value out of this function.
>
> function get_current_page_name()
> {
> $current_page_name = explode("/", $_SERVER['PHP_SELF']);
> $current_page_name = $current_pa
On Thu, 2002-02-14 at 11:09, James Taylor wrote:
> Can someone recommend a better method for doing something like the following?
> All of my programs are written like this, but it's really poor form
> considering I'm not predeclaring my variables, etc. Only thing I can really
> think of is to
On Thu, 2002-02-14 at 08:26, Fifield, Mike wrote:
> What I am trying to do is sort a array of arrays but I want to sort by one
> of the pieces of data stored in the arrays inside the array. For example;
> $data[blue] = array("name", "age", "time", "3");
> $data[green] = array("name", "age", "time"
On Thu, 2002-02-14 at 11:40, Morten Nielsen wrote:
> Hi again,
> I have read about sessions in the PHP manual and as far as I understand
> session needs the user to allow cookies. Is my understanding correct so far?
> But if it is required to accept cookies why not just pass all the required
> par
On Thu, 2002-02-14 at 11:15, Jaxon wrote:
> hi folks, can someone shed some light here?
>
> i've got a file called index.php with the following contents:
>
>
> echo "debug output: index.php loaded";
> if (is_null($page_name)) $page_name="about";
> echo "debug: page name = $page_name";
>
> $na
On Thu, 2002-02-14 at 12:26, Kevin Stone wrote:
> How can I open a local PHP script and view its code to the browser? The
> Readfile() method appears to parse and execute the code. The Fopen()
> method appears to parse and then not execute the code, leaving a blank
> screen, or at the very least
>
> This works..
> View Source for
> Myscript.php
>
> This doesn't work..
> http://www.mydomain/myscript.php";>View
> Source for Myscript.php
>
> Thanks for your help. It's always the little things that'll get ya. :)
>
> --
> K
On Thu, 2002-02-14 at 17:34, John Smythe wrote:
> i wanna know if there is a way of opening a file in a certian mode so when i write
>to a txt file it writes at the top of the file, and doesnt overwrite whats at the
>start of the file
No, not with fopen(). What you can do is create a temporary
condition'. The other method avoids that,
since while you're writing data to the temp file, processes just
keep using the original. Once you're done, the rename happens
atomically, preventing the race condition.
Torben
> -Original Message-
> From: Lars Torben Wils
On Fri, 2002-02-15 at 08:14, Erik Price wrote:
>
> On Friday, February 15, 2002, at 04:53 AM, Lars Torben Wilson wrote:
>
> > The problem with that is that you have a time lag (perhaps only
> > in microseconds, but it still is a problem) while you're writing
> &
On Fri, 2002-02-15 at 10:36, cyberskydive wrote:
> thanks guys,
>
> there is just one more question I dont see an answer for anywhere I've
> looked.
>
> will fseek read past \n's and if so how do I move the filepointer to a
> newline, or should I just put all the data on one line? (not unreasona
On Fri, 2002-02-15 at 05:43, Bendik Simonsen wrote:
>
> I've recently started to learn ASP (*ducks the hurled flowerpots and
> vases*) because my school requires it, but of course I prefer PHP for
> my own scripting needs.
>
> I have however, noticed one feature that ASP has that I have not foun
On Fri, 2002-02-15 at 11:40, Richard Crawford wrote:
> I'd be much more interested in microbreweries, though. Most commercial
> breweries like Anheuser Busch and Coors don't brew beer. Send some of
> their product to a lab, and the results will say something like, "Your
> horse has diabetes."
>
On Sat, 2002-02-16 at 05:55, Andy wrote:
> Hi there,
>
> I just installed my first linux box and I have problems on configuring php
> for my needs.
>
> It does not matter what I do to php.ini, nothing is changing. And yes, I did
> restart apache. I thought php4.1.1
> comes with gd2.0 build in, l
On Sun, 2002-02-17 at 11:05, Christian Blichmann wrote:
> Hi there!
[snip]
> if (condition) one_statement();
>
> if (condition)
> one_statement();
> else
> other_statement();
>
> if (condition)
> on
On Mon, 2002-02-18 at 12:12, Richard Fox wrote:
> That's right, the difference between C++ "pure virtual" and "virtual" is
> that a virtual function has an implementation but pure virtual only defines
> an interface.
>
> But can we get back to my original PHP question: Can I do something like the
On Sun, 2002-02-17 at 23:34, Paul J. Stevens wrote:
> I am using PHP Version 4.0.4pl1 with an Embedded Linux (PeeWee Linux,
> which is based on Red Hat 6.2 w/ a 2.2.18 Kernel).
>
> I have tried using shmop_open(), shm_open() & shm_attach(). All of these
> give an error message of "function not d
On Mon, 2002-02-18 at 13:14, Steven Walker wrote:
> Is it safe to use time() to generate a unique id number?
>
> My thinking is that the call to the server will take enough time that no
> two users will get the same time stamp (although they may be very
> close). Even though the likelyhood of
On Mon, 2002-02-18 at 08:56, Narvaez, Teresa wrote:
> Hello,
> I'm running PHP version 4.1.1. When I invoke this function, phpinfo()?>, all variables are set. However, when I try to retrieve a value
> of a certain variable like this:
>
>
>
> It returns NULL. Is there a missi
On Mon, 2002-02-18 at 14:58, Erik Price wrote:
>
> On Monday, February 18, 2002, at 05:44 PM, Lars Torben Wilson wrote:
>
> > On Mon, 2002-02-18 at 08:56, Narvaez, Teresa wrote:
> >> Hello,
> >>I'm running PHP version 4.1.1. When I invoke this functi
On Mon, 2002-02-18 at 15:02, Erik Price wrote:
>
> On Monday, February 18, 2002, at 05:50 PM, Narvaez, Teresa wrote:
>
> > When I execute the code below, why is PHP_SELF undefined? I will
> > appretiate
> > any help on this. I can get its value by:
> > echo $_SERVER["PHP_SELF"];Thanks
On Mon, 2002-02-18 at 15:29, Matt wrote:
> > $foo = "This page is $_SERVER[PHP_SELF]";
> >
> > Or, better:
> >
> > $foo = "This page is {$_SERVER['PHP_SELF']}";
> >
> > You do have to concat to do this in single-quoted (noninterpolated)
> > strings, though.
> >
> >
> http://www.php.net/manual/
On Tue, 2002-02-19 at 05:14, Ford, Mike [LSS] wrote:
> > -Original Message-
> > From: Matt [mailto:[EMAIL PROTECTED]]
> > Sent: 18 February 2002 23:30
> > To: Lars Torben Wilson
> >
> > > $foo = "This page is $_SERVER[PHP_SELF]";
[
On Wed, 2002-02-20 at 12:26, Analysis and Solutions wrote:
> Hi Steven:
>
> Steven Walker wrote:
> >
> > Does anybody know why the predefined variable $REMOTE_ADDR would be
> > null, while getenv("REMOTE_ADDR") works fine?
>
> Put "register_globals" on via your php.ini or .htaccess file. In ph
On Wed, 2002-02-20 at 12:42, Steven Walker wrote:
> What is the difference between $_SERVER and getenv()? Why should one be
> more reliable/better than the other?
>
> > Better: avoid globals and use $_SERVER['REMOTE_ADDR'].
>
> Sorry, if I'm asking you to repeat yourself... the documentation do
On Wed, 2002-02-20 at 14:13, Rein Velt wrote:
> At this moment (php4.1.1) the function "highlight_string" has the following
> syntax:
>
>
> [quote]
> bool highlight_string ( string str)
> This function prints out a syntax highlighted version of str using the
> colors defined in the built-in syn
On Wed, 2002-04-17 at 13:12, Leotta, Natalie (NCI/IMS) wrote:
> According to this, you should actually use unlink, but delete is available.
>
> http://www.php.net/manual/en/function.delete.php
>
> -Natalie
That's not actually what the page says...;)
> -Original Message-
> From: jas [ma
On Thu, 2002-04-25 at 12:22, Liam Gibbs wrote:
> I've been checking the PHP documentation, but can't
> find a function that will delete a member of an array,
> like such:
>
> $a = array(1, 2, 3, 4, 5);
>
> Use the function, say array_delete($a, 3); and that
> will delete the third member in the
On Thu, 2002-04-25 at 12:34, Nathan wrote:
> No. :-)
>
> What I've had to do is add a dummy value, unset($array[4]) and then array_pop the
>dummy value off
> the array to get it out of there completely. The reason: unset will only remove
>$array[4]'s value,
> not the key.
>
> There are plenty
On Thu, 2002-04-25 at 12:32, Pushkar Pradhan wrote:
> That's neat but I just read the docs. it says unset() won't work inside a
> function, even if you pass by reference!
No, that is not at all what it says.
> Anyways as far as you don't use functions to do the delete it will work
> fine.
> > On
On Thu, 2002-04-25 at 14:01, Kevin Stone wrote:
> About all I would suggest is that you eliminate the unecessary function
> calls substr and explode to optimize your code. I doubt prebuilt PHP
> functions will help you here. This is perfectly valid method for deleting
> elements in an array and
On Sat, 2002-05-11 at 14:53, Phil Powell wrote:
> TCL 1, PHP 0
>
> Ok, I am frustrated.. here is my code and this portion has to be done in
> PHP. I have a frame that can only be accessed if 1 of 2 things occur:
>
> 1) if $HTTP_REFERER has a specific value
> 2) if your nickname passed in the qu
On Sat, 2002-05-11 at 15:39, Andreas Indahl wrote:
> Hi!
>
> How can I read all files in a directory, when I don't know which files are
> there?
>
> Sincerely
> Andreas Indahl
Try some of the examples from the manual:
http://www.php.net/manual/en/function.opendir.php
http://www.php.net/manua
On Sat, 2002-05-11 at 15:52, olinux wrote:
> $dirPath = "C:\somepath";
> $dhandle = opendir($dirPath);
>
> while ($filename = readdir($dhandle)) {
This will bail on the first directory entry which has a name which
evaluates to false. Try it after 'touch 0' in the directory you're
scanningth
On Mon, 2002-05-13 at 18:03, Michael P. Carel wrote:
> Hi to all,
>
> How could i automatically enable Java in a Web browser to execute java
> script using PHP. I have some javascripts line's in my PHP script and im
> worried that it will not work if the browser was not java enabled. Or is
> ther
On Mon, 2002-05-13 at 19:32, Josh Edwards wrote:
> This is meant to grab a date out of a log file from the first line of the
> array but I'm getting a parse error on line 13. Any ideas?
>
> function getdate($hit)
There is already a PHP function named 'getdate()'; you'll need
another name here.
On Mon, 2002-05-13 at 20:01, Josh Edwards wrote:
> Thanks heaps for your help I really appreciate it. I have made the changes
> you suggested but now I only get a blank screen.
>
> function getmydate($hit)
> {
> $single = explode (" ",$hit);
> return $single[3].$single[4];
> }
>
> $filename =
On Wed, 2002-05-15 at 13:31, Matthew Walker wrote:
> I'm writing a coding standards document for our programmers, and I need
> to know if the 'echo' shortcut PHP tags are always on, or if we need to
> assume they might not be on.
>
> (By echo shortcut, I mean this syntax: )
The only guaranteed a
On Wed, 2002-05-15 at 17:13, Frank wrote:
>
> After installing PHP 4.2.0 I got the following error-message under a run:
>
> "Warning: Call-time pass-by-reference has been deprecated - argument passed
> by value; If you would like to pass it by reference, modify the declaration
> of [runtime fu
On Tue, 2002-05-28 at 16:56, Dan Harrington wrote:
> Greetings everyone,
>
> I'm trying to do some regexp magic and just can't seem to
> get it done with PHP.
>
> Basically I want to evaluate a word and if the last character
> of the word is an 's', to knock it off, unless there are
> two conse
On Tue, 2002-05-28 at 18:05, Gerard Samuel wrote:
> Its a fairly long script but this is a basic rundown of the mechanics.
>
> some_page.php
> -
> /* user is sent here from another page, grab foo and bar from the url */
> $foo = $_GET['foo'];
> $bar = $_GET['bar'];
>
On Thu, 2002-02-21 at 01:07, Berlina wrote:
> Hello to everybody,
>
> I need some help for writting a comparison of PHP vs JAVA, and of course, I
> need that PHP wins
> ;-D
Wins what? For what task? This is quite a nebulous question. And if
you've decided which will win before you've done the r
On Thu, 2002-02-21 at 10:44, Dave wrote:
> Apache server with PHP module
> Apache user is nobody:nobody
> Virtual user is user1:user1
[snip]
> Ideas or suggestions appreciated.
>
> Dave
Well, this isn't really a PHP issue, but what the hell. If you need to
do filesystem stuff as a certain user
On Thu, 2002-02-21 at 09:45, James Nord wrote:
> Hi,
>
> How do I get PHP to output an HTML tag instead of and XML tag when using
> trans_sid and a form in PHP.
>
> (eg)
> php outputs
>
>
>
> but I don't want the trailing /
>
> /James
I already told you how in the bug system: use output b
On Thu, 2002-02-21 at 08:16, Andrey Hristov wrote:
> It seems that you use global where it is not needed- outside of any function
> First error because error_reporting is not set to 0 in php.ini so error_reporting
>valus includes E_WARNING.
> if you set error_reporting=0 in php.ini or error_repor
Download Now
>
>
>
>
> downloadfile.php
>
>print_r ($_REQUEST['fileId']);
>if ( ! is_numeric($fileId) )
> die ("Invalid PictureNumber specified: ($fileId)");
>?>
>
>
> > -Origin
On Thu, 2002-02-21 at 14:11, James Nord wrote:
> Unfortunatly I know some that need to leave it.
>
> >If you would state exactly what the problem with the slash being
> >there is, perhaps we could help you.
> >
> The HTML renderer that comes with Java (jfc) renders the '>' due to the
> '/' bein
On Thu, 2002-02-21 at 22:31, K.Tomono wrote:
> Hi there.
>
> This must be a curious question, but I want to know...
Globals, and register_globals = on, are insecure for exactly this
reason. This is why new versions of PHP will default to register_globals
= off, and why it's a good idea to use r
On Mon, 2002-02-25 at 13:03, Mike Krisher wrote:
> Is there a way with PHP to grab a file from an external server
> (http://www.domain.com/image.jpg) and save/upload it onto my local server?
>
> Thanks in advance,
> __
> Mike Krisher
http://www.php.net/curl
Cheers,
On Mon, 2002-02-25 at 13:56, Phillip S. Baker wrote:
> What is the quick way to generate numbered arrays?
> I cannot seem to find it in my documentation.
>
> Looking to generate and populate an array with the numbers 0-23.
>
> Thanks
>
> Phillip
http://www.php.net/range
Cheers,
Torben
On Sat, 2002-02-23 at 20:13, KAT 44 wrote:
> Hello,
> I'm not sure if this is a newsgroup, list or direct e-mail
> address. In any case, I ask of anybody who can answer my
> question to *send me an e-mail* at [EMAIL PROTECTED],
> and not answer on the list/newsgroup/etc. (Thank you.)
I'm reply
On Mon, 2002-02-25 at 20:36, Michael P. Carel wrote:
> Hi there,
>
> Is there any function that can i used in wrapping a continuous line of words
> that will be displayed in the HTML table to avoid destroying its table
> format. I've tried wordwrapping function but it only wraps word with spaces
On Tue, 2002-02-26 at 01:29, Roger Keays wrote:
> Hi,
>
> Can anybody explain why the output of this script is
>
> not found
> Found!
Yup. array_search() returns the key of the found object, as noted in the
docs (http://www.php.net/array_search). Since the first test has the
searched-for field
On Tue, 2002-02-26 at 13:22, Bogdan Stancescu wrote:
> Hello all!
>
> How do I find out if a file was actually uploaded /without/ using
> is_uploaded_file()?
First: Why not use is_uploaded_file()? Second
Second: What version of PHP are you using?
Torben
> My first though is that I should use
On Wed, 2002-02-27 at 13:43, Brandon Orther wrote:
> Does anyone have a good idea of how I can pull the info out of a conf
> file setup like this? Maybe pull it into an array.
>
>
> ## Conf File ##
>
> domain.websites.com
>
>
> newsite.worldwideweb.net
>
>
> So I would get the domain.we
Diana Castillo writes:
> Is there any way tomake a page that cannot be printed??
No. If you display data on my machine I can do anything with it,
since it must exist on my machine in some form in order to be
displayed.
--
Torben Wilson <[EMAIL PROTECTED]>
http://www.thebuttlesschaps.com
htt
On Fri, 2002-03-01 at 20:03, michael kimsal wrote:
> Diana Castillo wrote:
> > Is there any way tomake a page that cannot be printed??
> >
>
>
> GZIP the page and force the end user to use Netscape. ???
No, still wouldn't work. If the data ever gets displayed, then it
is present on the viewer
On Sun, 2002-03-03 at 04:16, David Apthorpe wrote:
> I'm using PHP on the command line. Is there any way to exit, whilst setting
> the exit status, without having it print out? For example, exit(2) will
> print "2".
>
> Thanks in advance,
>
> David Apthorpe
This will be in PHP 4.2.0.
--
T
Job Miller writes:
>
> how do i escape the % character to appear in a sprintf
> statement?
>
> it doesn't mention that in the sprintf php manual
> page.
>
>
>
> job
Yeah it does--it's the first item in the list. :)
--
Torben Wilson <[EMAIL PROTECTED]>
http://www.thebuttlesschaps.com
ht
On Sun, 2002-03-03 at 19:32, Ken Tossell wrote:
> What var is the piped data placed in?
>
> Php 4.1 executable rhlinux 2.4.17
I'm gonna assume that you mean that you're doing something like this:
% cat somefile.txt | script.php
In which case, you'd need to fopen() the file 'php://stdin' and re
On Thu, 2002-03-07 at 06:25, Matt Williams wrote:
> Hi all
>
> I get a variable that is set be a select box on a page.
> I want to use this variable to call a function within a class that is based
> on it's name.
>
> so if $var = "me"
>
> I want to call $class->me_function();
>
> or if
>
>
On Mon, 2002-03-11 at 13:14, Erik Price wrote:
> Hello,
>
> I have a quick question, as I recompile my PHP installation up to 4.1.2:
>
> Is the --with-xml option to ./configure a standard these days? I seem
> to remember that in my initial PHP 4.0.6 installation I used this
> parameter, but I
On Mon, 2002-03-11 at 18:51, Randall Perry wrote:
> According to the PHP 4 docs all variables are global unless within a
> function. I've got the following test code which should output 2, but
> outputs 1. The while loop creates it's own class object (which seems strange
> since it isn't explicitl
On Tue, 2002-03-12 at 05:57, Richard Davey wrote:
> Hi all,
>
> At the moment I'm doing this to escape all "special" regular expression
> characters from my regex string:
Sounds like you want preg_quote():
http://www.php.net/manual/en/function.preg-quote.php
Hope this helps,
Torben
>$
On Tue, 2002-03-12 at 12:32, Ceyhun Güler wrote:
> if I write directly "localhost/myphp/resmigoster.php" on his browser
> it response
> Warning: Undefined index: dir in c:\inetpub\wwwroot\kocak\resimgoster.php on
> line 1
>
> Warning: Undefined index: res in c:\inetpub\wwwroot\kocak\resimgoster.p
On Tue, 2002-03-12 at 14:38, David Johansen wrote:
> I have a little chunk of code that checks to see if a variable exists and if
> not then it sets it. It goes like this:
>
> if (empty($page))
> {
>$page = "login";
> }
>
> I then end that part of the php script after doing what I need to. T
On Tue, 2002-03-12 at 14:33, max wrote:
> While looking thru php funcions (mixed ora_getcolumn ( int cursor, mixed
> column) in partucular)
> I came across type MIXED. What does that mean? There is no such type
> mentioned in the php
> docs under TYPES section.
>
> thanks.
>
> max.
It simply me
On Tue, 2002-03-12 at 15:02, David Johansen wrote:
> Is there a way that I can use $PHP_SELF in include files, so that the
> function will use the URL of the php script that calls the include file?
> Thanks,
> Dave
If a.php includes b.php, and you check $PHP_SELF in b.php, it should
give you the
c%20on%20line%2035 >?page=questions
You probably have register_globals turned off, as it should be. In
versions of PHP from 4.1.0 onward, it's off by default; see
http://www.php.net/release_4_1_0.php for more information.
In short, try $_SERVER['PHP_SELF'] and see what you get.
On Tue, 2002-03-12 at 15:17, David Johansen wrote:
> Here's the chunk of code in the include file that gave me that. I should
> have put it with the original post:
Ach. Well, $PHP_SELF is in the global scope, so you will either need to
use 'global $PHP_SELF;' at the beginning of your function, o
On Wed, 2002-03-13 at 11:06, Malte Hübner wrote:
> Hi!
>
> I've got a little Problem with my ErrorHandler.
>
> set_error_handler('ErrorHandler'); is executed on top of my script. Right
> after it the ErrorHandler function.
>
> After the ErrorHandler function there is a require('foo.php');
>
>
On Thu, 2002-03-14 at 13:20, Phil Schwarzmann wrote:
> Why doesn't this work...
>
> include("index.php?var='$var');
>
> I want to include a page in my code and send a variable to it but I get
> some funky error.
>
> THANKS!!
Please read this page carefully, especially the third paragraph an
On Thu, 2002-03-28 at 16:50, Dalton Hunter wrote:
> Hi, I want to search for a partial match in an array? Does in_array() or
> search_array() support this or is there another way? For example if I have
> 30 file names in an array in the format ...
>
> file1.txt
> file2.txt
> pic1.gif
> pic2.gif
>
On Sat, 2002-03-30 at 15:59, Uros Gruber wrote:
> Hi!
>
> This is a code
>
> function Test()
> {
> static $count = 0;
>
> $count++;
> echo $count;
> if ($count < 10) {
> Test ();
> }
> echo "j";
> }
> test();
>
> Output is
>
> 12345678910jj
>
> Why is
On Sat, 2002-03-30 at 16:16, Uros Gruber wrote:
> Hi!
>
> This I simply don't understand why this code executes that
> way. So there is only inportant to put return after recursive
> call and it works like i wan't. I sometimes write small C
> programs and I don't remeber that code like this have
On Sat, 2002-03-30 at 15:40, David Johansen wrote:
> I have a question about something weird that I've noticed Here's some code
> that I have that loads up
>
>$sql = "SELECT * FROM pickup_times WHERE DAYOFMONTH(time0_name) =
> $dayofmonth";
>
>$result = mysql_query($sql, $dbh);
>$day
301 - 400 of 509 matches
Mail list logo