How about a trailing slash after the directory name ;-)
like this:
$dirpath = "/home/sites/home/users/demodocs/web/userforum/" . $username;
you had:
$dirpath = "/home/sites/home/users/demodocs/web/userforum" . $username;
which would try to create a new directory inside the web directory.
die("$
If the "\" are showing up in form posted data just do this:
$newtext = stripslashes($oldtext);
The slashes are put before any single or double quote by a nifty little php
feature called "magic quotes". By escaping quotes in form posted data you
greatly reduce the risk of sql injections and other
Hi Steve,
try this:
if (basename($SCRIPT_NAME) == "index.php")
print "some silly message";
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Steve Minter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 9:50 PM
Subjec
How about this:
$text = "this is test";
preg_match can return the first match in an optional array I'll call
$matches
http://www.php.net/manual/en/function.preg-match.php
preg_match('/test/', $text, $matches);
strpos returns the numeric position of the first occurrence
http://www.php.net/manua
Hi Matt,
The user's browser will retain the session cookie as long as it is open
unless "session.cookie_lifetime" is set to something other than zero in the
php.ini or you can also set it in your script like this:
// set session cookie to expire in 30 minutes.
ini_set("session.cookie_lifetime","
I tested this out with success.
$string = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $string);
###
// Here is actual working code
$string1 = "(Something) - is wrong with me";
$string2 = "something - (is wrong with me)";
$string3 = "something - (is wrong with me";
$string4 = "[somet
This query will return only the 16th row
SELECT firstname FROM table_name LIMIT 16, 1
This query will give you all rows up to 15
SELECT firstname FROM table_name LIMIT 1, 15
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Tyler Durdin" <[EMAIL P
ad. Sorry if I threw you off. You can just do it like this:
$text_out = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $text_in);
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Mike" <[EMAIL PROTECTED]>
To: "'Tech Support'"
4.2.2 will not work with apache 2.X from what I've read. However, I have
heard that if you get the latest CVS of both php and apache it will work. I
have not, and probably will not, go down that road just yet :-)
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
http://www.php.net/manual/en/function.array-key-exists.php
The name of this function is key_exists() in PHP version 4.0.6.
Damn those elusive manual pages :-/
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "David D" <[EMAIL PROTECTED]>
To: <[EMAIL
well, you could simply loop through the session vars and build the query as
you go.
$query = "SELECT * FROM Inventory WHERE";
// I'm assuming you keep your item numbers in a "items" or something similar
foreach ($HTTP_SESSION_VARS['items'] as $pid)
$subquery .= " ItemNumber = '$pid' OR ";
//
I'm not a windoze user but if that line has a ";" at the beginning of it
like you have it in your message then it is commented out! LOL. :-)
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Ryan Moore" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent
the query
string to keep the session without the need for a session cookie.
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "k a m e s h" <[EMAIL PROTECTED]>
To: "Tech Support" <[EMAIL PROTECTED]>
Cc: "Matt" &
You need a web server like M$ IIS or Apache. I would rather chew tin foil
than run an IIS server even if it was on a win machine.
You can install the win version of the Apache web server and then just
browse to http://localhost/ to view your work.
Jim Grill
Support
Web-1 Hosting
http://www.web-1
This may sound silly, but you are uploading in binary mode right?
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 5:24 PM
Subject: [PHP] High Resolution Images
> Hello,
>
> I a
I know what you mean about everything being M$.
I'm a die hard GNU fan and therefore hate everything M$, but I can think of
more than one occasion where that attitude cost me some money. I somehow
still believe that if I stick to my beliefs and maybe try to convert some M$
people to host their si
It really depends on what version you have now.
I'd say the biggest thing to look out for is the register_globals, which is
now defaulted to "Off". This will break lots of sites!!! Turn it on unless
you want your phone to ring for days. Users should, however, be urged to get
used to coding with i
nal Message -
From: "Matt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 11:27 AM
Subject: Re: [PHP] Help: header function
> >From: "Tech Support" <[EMAIL PROTECTED]>
> > To: "k a m
Try just header("Location: $PHP_SELF"); or header("Location: $SCRIPT_NAME")
...leave out http:// ...and your quotes are in the wrong place too.
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "k a m e s h" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Congrats! Good choice!
Take a look here:
http://www.convert-in.com/acc2sql.htm
or here:
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=convert+access+databa
se+to+mysql
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Christian Calloway" <[E
okay... if register_globals is off then your session handling is going to
change dramatically.
You can read more on it here:
http://www.php.net/manual/en/ref.session.php
Basically, You still use session_start(); at the top of your page, but you
never use session_register, session_is_registered,
That's what happens when ISP's aren't careful about what happens on their
network. Getting your IP's on the black list is probably one of the worst
things you can let happen as an ISP. They warn you and give you time to
rectify the situation (cancel accounts/access of offenders) before they
actual
cURL needs to be compiled with SSL support.
./configure --with-ssl=SSLPATH where SSLPATH is the actual path to where
openssl can be found.
./configure --with-ssl=/usr works for me.
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Oscar F" <[EMAIL P
Are you asking us how to write an entire online community program???
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "umesh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 28, 2002 6:40 AM
Subject: [PHP] Help reg. create user and alloc
There is no substitute for good data verification such as strip_tags() or
some regular expressions to limit valid input. I also would recomend
checking the referrer to be sure someone doesn't hijack you form and try to
modify it and submit it from a remote location. Here is an example:
if (validR
Here is an idea
using this method "car" would match "car", "carwash", "scar", "scarred",
etc.
Since this result will contain the entire boy of text you could some more
matching or scoring for relevancy
I had that code from a previous working project. I copied it and changed
some var names to
eb-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Bob Lockie" <[EMAIL PROTECTED]>
To: "Dennis Gearon" <[EMAIL PROTECTED]>; "Tech Support"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, July 28, 2002 1:19 PM
Subject:
You could join the developer's list and just read. I joined just to keep up
with what's coming in future releases and it's also pretty interesting. They
are constantly talking about what features/bugs need work and when they want
to do a release and who will be on vacation and can't help and blah
There are many types of licensing and it really depends on what the author
licensed it under. Most are GPL. Normally the first few lines of the LICENSE
file typically included with the dist will explain the details of the
license. If there is not one always assume that if you use any part of it in
Uhhh but you really should ask the author too. ;-)
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Tech Support" <[EMAIL PROTECTED]>
To: "Chris Boget" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PR
That is correct. As long as the expiration date is past present it's fine. I
used to work for another hosting company who would just "guess" new
expiration dates for monthly recurring customers who had not submitted a
cancellation request but who's cards had expired. As long as the date was
past p
try preg_grep()
http://www.php.net/manual/en/function.preg-grep.php
example:
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 10:36 AM
Subject: [PHP] searching an arra
That last statement was not entirely true.
The server does not have to know when someone leaves to clean up.
You are right about session.gc_maxlifetime and session.gc_probability.
if the maxlifetime is set to 1200 (20 minutes) and the probability is set to
1 that means that one percent of the t
osting.net
- Original Message -
From: "Purushotham Komaravolu" <[EMAIL PROTECTED]>
To: "Tech Support" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 1:44 PM
Subject: Re: [PHP] mcrypt
> Hi,
> Thanks
Hello
I'm preparing to start an ecommerce project that will require the use of sessions
throughout the entire site for referrer and affiliate tracking purposes. I also plan
to use mod_rewrite to make links to dynamic content search spider friendly. example:
instead of /somescript.php?var1=valu
Ultraedit is great. To make UltraEdit "php friendly",
if you goto: Advanced->toolconfiguration
set:
Command line to: c:\php\php -e -f %F (assumes php installed at c:\php\)
Working dir: c:\php (whatever, that's just what I use)
Menu Item Name : Php (ditto)
che
Hi
I think if you want the user to type in a number, rather use a textbox, not a checkbox
;-))
Then call the textbox "phone" in the form you want the user to fill in, and when
submitted, the variable $phone will contain the number he typed in.
Then use:
$prefix = substr($phone, 0, 3);
if (($
37 matches
Mail list logo