ink and not 'here'
as it supposed to be.
Any help would be appreciated.
Thanks
=_L_OL_HERE=';
$bar = preg_replace('/(=)([A-Z0-9_])(=)/e', ' . constant("$2") . ', $foo);
echo $bar;
?>
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org
from an mysql dump
$data2 = str_replace('/\', '/\/\/\', $data);
Im getting ->
Unexpected character in input: '\' (ASCII=92) state=1
I guess my str_replace() isn't correct.
Am I going about the right way to double escape them.
Thanks.
--
Gerard Samuel
http://www.t
following it. If you add two backslashes, you end
>up with one too many which is what the error is referring to.
>
>
>..micahel..
>
>On Thu, 2002-06-20 at 10:59, Gerard Samuel wrote:
>
>
>>Im trying to move some binary strings from mysql to postgresql,
>>and t
files that this function calls on and there is no
'white space' before or after
Are there any other reasons why header() would fail while output
buffering is off.
Im running php 4.2.1 on FreeBSD 4.5-R p6
Thanks
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/
#x27; before or after
Maybe Im missing something. I think Ill put it aside and look at it
when the brain is fresh...
Thanks
Erik Price wrote:
>
> On Monday, June 24, 2002, at 04:15 PM, Gerard Samuel wrote:
>
>> Are there any other reasons why header() would fail while output
;
}
else
{
echo "Problem: $errno";
}
?>
-----
Its coming back with a HTTP/1.1 400 Bad Request
Any help would be greatly appreciated.
Thanks
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Worked perfectly.
Thanks.
Evan Nemerson wrote:
>Try
>
>fputs ($fp,"GET ".$url[path]." HTTP/1.0\r\nHost: " . $url[host] . "\r\n\r\n");
>
>Your old request looked like "GET / HTTP/1.0\r\nHost:value_of_host/\r\n\r\n",
>hence the 400.
What other characters are possible from the output of base64_encode()
except [A-Za-z0-9] ??
Thanks
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in answer to your question the extras look like + and /.
>26+26+10+2=64 sounds right.
>
>HTH
>Andrew Braund
>
>
>
>>-Original Message-
>>From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, 27 June 2002 11:15
>>To: php-gen
>&g
ch as confirming a dialoguebox) opens the
>'actual' browser window at the correct location and the right size?
>
>thanks in advanced for your help!!
>
>nik crosina
>
>
>
>
>
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/
--
PHP Gen
looked through through the specs, but it didn't say that
links/urls shouldn't be formatted like the first example above...
Any insight, would be grateful.
Thanks
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/
--
PHP General Mailing List (http://www.php.net/)
To
rect/path/to/the/file.php" should be used. You can
>omit the http:// and the host name if you like.
>
>=C=
>
>*
>* Cal Evans
>* Journeyman Programmer
>* Techno-Mage
>* http://www.calevans.com
>*
>
>
>-Original Message-
>From: Gerard Samuel [ma
pplication Developer / Analyst
>>Sykes Canada Corporation www.SykesCanada.com
>>(888)225-6824 ex. 3262
>>[EMAIL PROTECTED]
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
&g
>Michael Hall [EMAIL PROTECTED]
>--------
>
>
>
>
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Im currently testing with PHP5.0.0b2-dev Aug 27 2003 08:07:21 on windowsXP,
Apache2.
I have a class that acts as the DB layer, of which I pass all objects by
reference.
It works like a dream in PHP 4.
Not sure if this is the expected behaviour, or an unwanted side effect.
--- start psuedo snip --
I got an application that uses Smarty, ADODB, and some other custom classes.
So I have about about 5 objects floating around,
and the Smarty object, and another class contains a reference copy of
the ADODB object, and I just get that feeling that it can
be better.
By having one class where they al
Just double checking with the php crowd.
Code example:
-
$bar = new second_class;
echo $bar->foo() . '';
var_dump(get_class_methods('second_class'));
class first_class
{
function foo()
{
echo 'foo from class first_class';
}
}
class second_class extends first_class
{
Robert Cummings wrote:
Method overriding is one of the core principles of any Object Oriented
(OO) language. By having second_class extend first_class you get all the
functionality of first_class, but generally you extend a class because
you want to inherit all of the functionality with a few diff
Robert Cummings wrote:
Are you looking to create a single point of access to any libraries your
application may wish to use
Yes. Instead of juggling 5-6 objects, just move around one object.
and to subsequently base this on a singleton
pattern (only one instance of the object may exist?)?
Yes.
If I understood the question wouldn't this work???
if (!is_null($int) && $int < 1)
{
// do some foobar
}
Carl Furst wrote:
IF $int is null and I have a test
If($int < 1) {
//do some foobar
}
will $int be evaluated as a zero? IF I cast (int) $int.. will that turn a
null $int into a zero??
Docum
Not sure about mysql, but with pgsql, if you create your database with
utf-8 or equivalent japanese
encoding, you should be able to store japanese characters in the db...
Chris W. Parker wrote:
(I posted this to another list yesterday without response, so if it
looks familiar, that's why.)
Hi.
Got a problem with htmlspecialchars being too greedy, where
for example, it converts
&foo;
to
&foo;
Yes it displays correctly in the browser for some content, but not all.
(an example is posted below)
So I came up with this example code, but not sure if there is an
easier/better way to get the c
CPT John W. Holmes wrote:
From: "Eugene Lee" <[EMAIL PROTECTED]>
On Wed, Oct 01, 2003 at 01:12:16AM -0400, Gerard Samuel wrote:
:
: Got a problem with htmlspecialchars being too greedy, where
: for example, it converts
: &foo;
: to
: &foo;
:
: Yes it displays correctly
Eugene Lee wrote:
On Wed, Oct 01, 2003 at 02:02:08PM -0400, Gerard Samuel wrote:
: CPT John W. Holmes wrote:
: >From: "Eugene Lee" <[EMAIL PROTECTED]>
: >>On Wed, Oct 01, 2003 at 01:12:16AM -0400, Gerard Samuel wrote:
: >>:
: >>: Got a problem with htm
I've noticed code written in this order ->
if (FALSE === $foo)
{
// yada yada
}
Is there a reason/benefit to test variables like that instead of ->
if ($foo === FALSE)
{
// yada yada
}
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.ph
Curt Zirzow wrote:
Yep. Just make sure you dont start speaking english like that,
people will look at you funny, or think your yoda :)
if ('away' == $put_your_weapon) {
$harm = false;
}
/* Away put your weapon, I mean you no harm */
or
if ( 'help' == $you_can ) {
hmm();
}
/* Help you can, Hm
Or is there such a thing. ;)
I have a small collection of utility classes, and it seems like the more
I add,
the more cumbersome things seem to get.
A brief synopsis of code execution.
1. Start DB class
2. Start Smarty class, passing reference of DB class to Smarty
3. When needed start Date-Ti
Jay Blanchard wrote:
Global space? Yes, what you're talking about, if possible, is a sin.
Why is getting the classes to work together a pain?
A little misleading about what Im feeling.
Im feeling that the more classes that I add the more cumbersome things get,
and at the rate Im going, I get th
Robert Cummings wrote:
Feel free to ask questions
I couldn't come up with anything substantial via other examples, so I
fell back on a similar
structure that Im currently using in my DB code.
The goals:
1. To be able to have the child classes to talk to one another.
2. To be able to have the p
- Edwin - wrote:
"Far east languages" are not necessarily in this form: "n;" So,
running htmlspecialchars() on, say, Japanese characters would do NO
harm since &, ", ', <, > are NOT Japanese characters ;)
Or, am I missing something? :)
Not exactly. When storing "far east languages" in a d
Curt Zirzow wrote:
That is an html entity and is not how it is stored. How that entity
gets displayed depends entirely on what encoding you have set for
the page.
The japanese characters (charset ISO-2022-JP) to use to display the
phrase for 'Contents' is:
^[$B$3$s$F$s$D^[(B
(^[ == escape charac
Im trying to create some dummy code where child classes can talk to each
other.
Im looking to verify some behaviour Im running into.
When a child extends a parent, from that point on, the parent, has no idea,
on what the child is capable of, or what it contains.
Is that a "real" parent??? ;)
With
Dan Anderson wrote:
Im looking to verify some behaviour Im running into.
When a child extends a parent, from that point on, the parent, has no idea,
on what the child is capable of, or what it contains.
Is that a "real" parent??? ;)
No but if you really wanted to you could create a framew
Dan Anderson wrote:
Out of curiousity, what exactly are you trying to do? Are you sure this
type of framework is most appropriate (and easiest to implement?)
In my current setup, the more classes Im adding to the code, the more
complex things seem to get.
For example.
I have a smarty object that
Jeremy Johnstone wrote:
What I would do is pass the handles to the objects in the class
constructor by reference. For example create one db object similar to
this:
class database
{
...
}
$db = new database();
and then pass the reference to all other classes like this:
class smarty
{
var $db;
Jeremy Johnstone wrote:
I would have to see your code
That can be arranged.
Ill email you offlist.
, but maybe you don't need to be passing
the references your doing. Why does your Smarty class need to access the
database? Why does your Smarty class need a reference to the user
management class i
Tom Rogers wrote:
To do this I have my classes register themselves in a global array.
For example a mysql class which gets used a lot does this in its constructor:
function mysql_class($db='',$ini=''){
global $class_ref;
$class_ref["mysql_class"] =& $this;
.
.
.
}
Then any class that needs ac
Andy Crain wrote:
This all seems like a perfect case for the singleton pattern. See
http://www.phppatterns.com/index.php/article/articleview/6/1/1/ and
http://www.phppatterns.com/index.php/article/articleview/75/1/1/
Andy
Im currently trying to wrap the brain around the Singleton Registry article.
Gerard Samuel wrote:
Andy Crain wrote:
This all seems like a perfect case for the singleton pattern. See
http://www.phppatterns.com/index.php/article/articleview/6/1/1/ and
http://www.phppatterns.com/index.php/article/articleview/75/1/1/
Andy
Im currently trying to wrap the brain around the
The question is what happens to local variables when the code leaves a
function/method
as far as memory is concerned.
Does it *silently* unset (free the allocated memory) the local
variables, or does it make sense to hardcode
unset() to garbage these local variables?
Thanks
function foo()
{
$
Robert Cummings wrote:
On Tue, 2003-10-07 at 22:44, Gerard Samuel wrote:
The question is what happens to local variables when the code leaves a
function/method
as far as memory is concerned.
Does it *silently* unset (free the allocated memory) the local
variables, or does it make sense to
On Sunday 26 October 2003 06:45 pm, Gerard Samuel wrote:
> On Sunday 26 October 2003 12:19 pm, Gerard Samuel wrote:
> > I have a common included file with error_reporting set to 0
> > If I do a var_dump(error_reporting()) right after it it returns 0
> > In a file that includes
On Sunday 26 October 2003 12:19 pm, Gerard Samuel wrote:
> I have a common included file with error_reporting set to 0
> If I do a var_dump(error_reporting()) right after it it returns 0
> In a file that includes this common file, if I var_dump(error_reporting())
> there it return 2
I have a common included file with error_reporting set to 0
If I do a var_dump(error_reporting()) right after it it returns 0
In a file that includes this common file, if I var_dump(error_reporting())
there it return 2047, which I believe is E_ALL
It that the correct behaviour of error_reporting??
On Sunday 26 October 2003 07:12 pm, Dan McCullough wrote:
> No I believe that is a feature the ability to turn off error reporting.
> You can do the same with mysql functions.
>
> @mysql_
Yes I know about turning off error reporting, but what happens after that
point.
An example.
-- common.php
On Monday 27 October 2003 12:58 am, Shawn McKenzie wrote:
> Thanks, but I was looking for a multi-platform way via a function.
rename()
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Monday 27 October 2003 09:08 am, Curt Zirzow wrote:
> * Thus wrote Marek Kilimajer ([EMAIL PROTECTED]):
> > This should be reported at least as a documentation bug (if it's not
> > already mentioned, I'm lazy to search :)
>
> I dunno, this seems like a php bug to me. The @ should only effect
>
The docs do not state what the defaults are, and from tests,
it seems the values 4 - 9 return the same output as with no value,
on the string I tested with.
Does anyone know what the default compression levels are?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Wednesday 29 October 2003 02:24 pm, Payne wrote:
> Hi,
>
> I have been working on a simple PHP script that called to a mysql
> database, where I do the following
>
> SELECT url FROM sponsors ORDER BY RAND();
Try ->
SELECT url FROM sponsors ORDER BY RAND() LIMIT 1;
--
PHP General Mailing
On Wednesday 29 October 2003 03:27 pm, David T-G wrote:
> Gerard --
>
> ...and then Gerard Samuel said...
> %
> % The docs do not state what the defaults are, and from tests,
> % it seems the values 4 - 9 return the same output as with no value,
> % on the string I tested wit
On Sunday 02 November 2003 11:50 am, Simon Stiefel wrote:
> Sorry, one correction:
> the 'chop()'-function only removes the whitespaces an the END of the
> string.
>
> But if you want to remove the newline (and only this) at the end of the
> string try this:
>
> $new_string = preg_replace("/\n$/",
Currently, Im storing language "translations" if you will, in
regular php files.
I could have sworn there was a thread in the archives, about the pro/cons
about storing such strings in php files, and the author recommended xml files
because of UTF-8 reasons (that much I think I remember).
If anyo
On Friday 14 November 2003 12:48 pm, joe wrote:
> is there a way to check the file size
> without fully uploading the file?
>
No there isnt, well at least not via php...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Most of the time, I edit files via the command line, (FBSD).
When the files are saved, it adds a \n (newline) character (at least I believe
that is what it is) after the closing ?>
When viewing these files in a windows GUI editor, there is an extra line
after the ?> closing tag.
Using the php func
Whats your take on adding your own data in the $_SERVER array?
For example, if I wanted to add a value to the $_SERVER array like ->
$_SERVER['foo'] = 'bar';
Yes its possible, but Im looking for "legality" issues with this frame of
thought.
Thanks
--
PHP General Mailing List (http://www.php.ne
On Saturday 15 November 2003 08:22 pm, Chris Shiflett wrote:
> 1. When a closing PHP tag, such as ?>, is followed by a newline, the
> newline is not output.
Im the original author to this thread, and this is an attempt to bring back
this thread to square one, as it was straying in other directio
Im looking to find out information on what hosting companies do to
run php on their servers.
So that I can try to duplicate their environments, to see how my scripts
behave under "real world" conditions.
Currently, I use a default php.ini setup, and control domains via apache's
config file.
--sn
> I don't know from any other mail programs -- mutt does everything I need
> and then some -- but I have heard good things about Evolution, Sylpheed,
> and TheBAT! at various times.
>
>
If you're in a *nix environment, add KMail.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
That is not explained in the manual
As far as I can tell, the difference (according to the manual) is that one can
be overridden by an .htaccess file, while the other cannot
Im testing to see how my script is behaving in an environment with
safe_mode turned on.
In apache's config file, I
On Wednesday 26 November 2003 05:21 pm, Gerard Samuel wrote:
> That is not explained in the manual
> As far as I can tell, the difference (according to the manual) is that one
> can be overridden by an .htaccess file, while the other cannot
>
> Im testing to see how my scr
On Saturday 29 November 2003 12:54 am, Bronislav Klucka wrote:
> because we know that this bug
> has easy solution...
[jumps in]
Yes ->
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.
[jumps out]
--
PHP General Mailing List (h
On Saturday 29 November 2003 03:20 am, Bronislav Klucka wrote:
> what does it mean?
>
I don't want to get into this debate too much, but from what little I read
when it was going on earlier this past week, people who seemed to complain
the most are the ones using Outlook. Seems like Outlook isn
On Thursday 04 December 2003 10:36 am, Gohaku wrote:
> Hi everybody,
> There are some pages I would like to extract links from but I can't
> access the page using the following:
> ini_set('php.user_agent', 'Mozilla/5.0');
This should work ->
header('User-Agent: Mozilla/5.0');
--
PHP Gen
First time trying out this function, but the output doesnt make any sense to
me.
An example ->
';
/* PHP CODE HERE WITH A BUNCH OF INCLUDES/CLASSES/SMARTY ETC */
echo memory_get_usage();
?>
Gives me ->
22408
1347416
According to the manual, my example says the script starts off with 22k bytes
On Saturday 06 December 2003 01:41 pm, Gerard Samuel wrote:
> According to the manual, my example says the script starts off with 22k
> bytes, then end up with 1.3M bytes at the end. (Now thats scalable :P)
> But seriously, has anyone seen anything like this?
> Tried it on FreeBSD 4
On Saturday 06 December 2003 11:01 pm, Richard Davey wrote:
> Yes, check the $_FILES['userfile']['type'] after upload.
>
That can be spoofed.
There isn't really a way to determine file types...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wednesday 10 December 2003 02:43 pm, Galen wrote:
> If you store images that are played with a lot on
> the disk, it'll likely be slower than MySQL due to MySQL having better
> caching.
I disagree.
Depending on your setup, when a file based image is downloaded to
a user's computer, its cached
Just curious about something I came across.
I was looking at the $GLOBAL array, to see what my script was leaving behind.
$GLOBALS contains a reference to itself.
Even though its a reference, whats the sense with that??
Once its global, why should it have to call on itself?
Im currently running php
Looking to squeeze as much out of my core scripts (not that they are
slow ;) ).
The thought arose that I can replace simple functions like
is_string(), is_array() with simpler php code.
For example ->
';
}
else
{
echo 'false';
}
}
?>
It seems to work, and debugging it via
On Tuesday 16 December 2003 09:33 am, Marek Kilimajer wrote:
> For correct benchmarking you should run the test also when $foo == 'string'
>
Actually, I did, showing similar results to my first example.
';
}
else
{
echo 'false';
}
}
?>
--
PHP General Mailing List (http:
Currently in my code, if a user is blocking cookies (for what ever reason that
may be), it keeps generating session ids for each page load.
Is there a way to ignore and/or work around these "users"??
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.
On Wednesday 17 December 2003 01:33 am, Justin Patrin wrote:
> You can turn on URL rewriting for sessions. I'm not sure where it is
> just nowjust search the PHP docs.
>
Yes I know about this feature.
Unfortunately, its an insecure feature.
http://us2.php.net/manual/en/ref.session.php
http://u
On Wednesday 17 December 2003 11:58 am, Chris Shiflett wrote:
> You can use GET data, POST data, or cookies. Since these users opt to not
> use cookies, and you seem to not want to use GET data, I suppose passing
> the information via POST is the only option left. :-)
>
Its not that I dont want to
Im currently modifying templates to include the SID constant, for the few set
of users who are rejecting session cookies.
If I have an url like ->
http://www.foo.com/";>Go Home
For users who are rejecting cookies the url looks like ->
http://www.foo.com/?PHPSISSID=1234";>Go Home
For users who ar
On Monday 22 December 2003 01:20 am, Gerard Samuel wrote:
> My question is, are there any known problems with just having '?' at the
> end of urls/links?
Don't worry, I think I figured out another way...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visi
On Monday 22 December 2003 02:14 am, Jasper Bryant-Greene wrote:
> No, that will work fine. Just having ? at the end of the URL just means
> an empty querystring - same as if you had nothing there.
>
> Regards
>
Thanks. My other idea didn't pan out, so Im going back to this idea.
Back to work for
On Saturday 27 December 2003 07:03 am, Andy Higgins wrote:
> Hello All,
>
> I have been racking my head over a problem where a large percentage of
> users are unable to log into my php site due to what seems to be a problem
> with setting php session variables on certain end user browsers (certain
On Saturday 27 December 2003 10:54 am, Andy Higgins wrote:
> 1. At the time of login will the login code need to check if the clients
> browser accepts cookies and if not then append the SID as described? If so,
> do you perhaps have a sample piece of code that does this?
No, php does this for yo
On Sunday 28 December 2003 11:17 pm, Cesar Aracena wrote:
> $fp = fopen("../files/welcome.txt", "a+");
>
Change to
$fp = fopen("../files/welcome.txt", "r");
Use "r" to read, when you use "a" it appends (or adds) to the file
Its also suggested to use the "b" option to so it would look like
$fp =
On Monday 29 December 2003 09:50 am, Cesar Aracena wrote:
> Now it gives me the following error message:
>
> Warning: fopen(websitename/esp/files/welcome.txt): failed to open stream:
> No such file or directory in d:\wwwroot\websitename\esp\lib\functions.php
> on line 6
>
> But the file exists and
I found some code at
http://marc.theaimsgroup.com/?l=php-general&m=106942414231212&w=2
that was meant to extend strip_tags() where it wouldn't be
blindly prone to XSS attacks via tag attributes.
Unfortunately, that code works too good.
If one were to pass a legal tags like
http://us2.php.net/ima
On Friday 02 January 2004 02:11 am, Cesar Aracena wrote:
> Hi all,
>
> can somebody remind me how to propperly insert not just one but many
> variables into a $_SESSION handle? php manual doesn't explain it very well.
> It just says that it can be done.
>
$_SESSION['foo'] = array('a', 'b', 'c', 'd
On Saturday 03 January 2004 10:37 pm, Shawn McKenzie wrote:
> I searched the archives and Google but couldn't find a solution.
>
> I would like to know if there is a good server independent method method
> for optimizing URLs that contain GET queries for search engines. Server
> URL rewriting (i.e
Hello everybody,
I have two websites that use Apache-1.3.12 + PHP-4.0.2 + Oracle8i on
Linux RedHat servers.
One of them doesn't use the session_start() function. If I do a telnet
on port 80 and type in "HEAD / HTTP/1.0" I get the following :
HTTP/1.1 200 OK
Date: Wed, 17 Jan 2001 08:50:34 GMT
is there any way to resize images in php and save them to a new file?
i want to write sort of a (db-powered) picture gallery that automatically
creates thumbnails out of http-uploaded files.
thanks for your advice
venome
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
--
I got a fairly big script with a lot of functions.
Which is more effiecient to pass global information to functions
ie
50 variables
50 constants
or 1 array with 50 values
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
I came across an application "sourcewell" and it requires PHPLib.
My server has php4 on it. I never played with php3 before (dont know if
I want to), and I didn't see anything in its docs about php4
Is it possible to run this thing on a box with php4??
Thanks
--
PHP General Mailing List (htt
ad
of displaying phpinfo().
Anyone knows of any pointers of getting php4 to recoginise php3 files as
php files. Im currently using apache 1.3.22, php 4.0.6.
Thanks..
Björn Schotte wrote:
> Hi,
>
> * Gerard Samuel wrote:
>
>>I want to), and I didn't see anything in its docs
Need some help with this one. Dont know where to begin. I have content
in a string and a constant that changes depending on if yourre in the
root or in a directory.
The purpose of the constant is to provide dynamic links.
The string will have href links like Index
I want to figure out a way to
Hey all. Im putting together a script and Im having a couple people
test it out.
Here is a bit of code...
$c = explode ('/', dirname($PHP_SELF));
array_shift($c);
It runs fine on my box, php 4.0.6, apache 1.3.22.
On a box with php 4.0.4pl1, apache 1.3.20 it spits an error.
Fatal error: Call
ike:
>
>ereg("^[^/]/(.*)$", dirname($PHP_SELF), $regs);
> $c = explode("/", $regs[1]);
> ?>
>
>
> On Wed, 09 Jan 2002 22:00:49 -0500, Gerard Samuel wrote:
>
>
>>Hey all. Im putting together a script and Im having a c
Thats my biggest concern now, performance with whatever alternatives
that can be dreamed up...
Anyway, its 6 in the morning, time for sleep. Maybe Ill dream up
something else
[EMAIL PROTECTED] wrote:
>
> You are right, I should've known (used it before) ..
>
> Ofcourse you could do an a
If != is the opposite of ==
What is the opposite of === ??
Thanks...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hey all. I was wondering. Is it safe to use HTTP global variables ie
$HTTP_POST_VARS etc in my scripts?
Thought I read somewhere that they weren't safe.
Got a lot of forms to work with, it sure would make life easier...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail
Hey all. I was making a menu, and I was using too many links, so I
figure use a form with drop down lists.
Im trying to use the form using the get method.
echo '';
It doesn't seem to behave correctly. Can one use test.php?ft=first in
the action of a get form??
It works great if I make a hidden
Just want to bounce this idea off you guys/gals.
Im looking to improve the security of my scripts. Now lets say, I
initialise the script with a constant in the main config file that all
the pages access. Then when Im accepting data from a form or maybe even
a link I could do
if (isset($HTT
well wrote:
> how is that going to increase security?
>
> -Original Message-----
> From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 15, 2002 11:21 AM
> To: php
> Subject: [PHP] An idea...
>
>
> Just want to bounce this idea off you guys/gals.
-Original Message-
> From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 15, 2002 11:31 AM
> To: Martin Towell
> Cc: PHP
> Subject: Re: [PHP] An idea...
>
>
> Quote from the php manual.
> "Once a constant is defined, it can never be changed o
Just catching up on my emails and saw this thread.
Just a note that it didn't happen under
FreeBSD 4.5-R p3
PHP 4.1.2 (Apache module)
386M Ram, PIII 450 box
The script died after the max_time setting, and apache's children
returned back to their happy go lucky nature all by themselves...
Billy
I redoing some code, and the original author has code like
if
elseif
elseif
elseif
else
I have always known it to have just one elseif, not multiple ones.
I was going to move it to a switch/case, but there is no common switch.
So I wanted to know if its technically ok, or just ok to use multiple
101 - 200 of 526 matches
Mail list logo