logs archiveIRC Archive / Freenode / #php / 2006 / March / 31 / 1
^Migs^
Smarty is a template engine
Andy298
so how can i reference whatever data is submitted from a form?
a loop or something?
Stormchaser
feistel: Templating engine != framework.
^Migs^
$_GET or $_POST\
feistel
^Migs^: what is the best framework for you?
philip
how about the zend framework
^Migs^
I don't use framework
philip
Andy298: php.net/variables.external
^Migs^
I don't think I understand what you mean by framework here
         

feistel
I am finding a good framework for e-commerce applications
Stormchaser
philip: I hear Zend's framework is crap.
feistel
^Migs^: http://www.coldscripts.com/PHP/Scripts/Development/Frameworks/?gclid=CLXDm4HEh4QCFQ9_LAodOkKkfw
Stormchaser: http://www.coldscripts.com/PHP/Scripts/Development/Frameworks/?gclid=CLXDm4HEh4QCFQ9_LAodOkKkfw
choose one!
myconid
while(ctype_alpha($value{$sub_string_count}) && $sub_string_count > 0){ $sub_string_count--; }
shouldnt that backup through a string until it finds a non character?
or the beginning of the line
Stormchaser
*blink*
KimmoA
I simply won't find the perfect Web host for my needs by searching for it. Do you know of any serious USA based host with support for PHP 5.1, cronjobs, CLI, MySQL, etc., or am I stuck doing it myself on my own server again? :/
et
myconid: strrev and strspn will look way nicer.
^Migs^
uh, why?
et
myconid: or use regex...
myconid
KimmoA: What kinda bandwidth?
itrebal
KimmoA: some people may say DreamHost, but that was the WORST host i had EVER experienced
KimmoA
myconid: More than 30 GB/month, at least.
^Migs^
why, itrebal?
KimmoA
itrebal: Hrm...
myconid
KimmoA: What kinda site?
^Migs^
I've heard nothing but great things about it
I'm regretting godaddy right now
KimmoA
myconid: Multiple. Must allow vhosts and support RewriteRule too...
myconid
KimmoA: can I msg you?
KimmoA
Maybe this is hopeless. I'm probably gonna end up brushing off my server...
myconid: Um... sure?
itrebal
^Migs^: do you consider 4 days of hosting without apache working (httpd errors) MySQL working one out of those 4 days, 16 server reboots, and 4 'sorry your service is down...' emails great?
         

jfro2
does DirectoryIterator not always order things by name?
it has been until this one time
^Migs^
see, I've never heard of a user who had any of that, except you
so in my mind, you're the exception
how long ago was this?
BaconTastesGood
how do I sanitize a string when I need to send it via SMTP?
^Migs^
smtp_sanitize_string()
BaconTastesGood
I'm using a From: of "So & So" and the ampersand is blowing things up
itrebal
^Migs^: one of the emails of the httpd errors told me "sorry that it hasn't worked yet, it generally takes 2-3 days for the config file to take hold, but 4 is unusual" as well as several other people telling me 'if you dont screw with the hosts configuration, its fine.... but when you do you have to wait 3 days for it to work'
Jax
how can i avoid the double line here? http://pastebin.com/631492
(just 5 lines)
itrebal
Jax: http://pastebin.com/631495
that may work
Jax
hm
interesting
thanks
jfro2
anybody ever notice DirectoryIterator not ordering by name
myconid
how can I tell if a single entry in a string $string{$id} is a character (a-zA-Z0-9)
danf_1979
ctype_alnum
BaconTastesGood
SMTP is barfing on an ampersand char I'm putting in a name field, what can I call to fix that?
myconid
doesnt $string{$id} return a single char?
AcidReign
myconid: yes
BaconTastesGood
how can I run PHP interactively?
myconid
BaconTastesGood: type php at a cli
while(ctype_alnum($value{$sub_string_count}) && $sub_string_count > 0){ $sub_string_count--; <- doesnt seem to work
AcidReign
BaconTastesGood: php -h gives all command line options
BaconTastesGood
k, thanks
Ahroun
I always wondered how to get into interactive mode. Cool. Joy. Not very useful, but neat.
mikearthur
is there a command like trim, but inversed?
so I could say trim all but [A-Z][a-z][1-9]
Ahroun
keep only the white space and get rid of the text in the middle? Oh, that's not quite the inverse. :)
mikearthur: I'd use a regex there.
mikearthur
ok
t432
is there any way to find out if mysql has been configured properly to work with php5? my php script is not seem to be working I kepping an error
error: Fatal error: Call to undefined function mysqli_init() in c:\Apache\htdocs\dbconnect.php on line 4
cyphor
are these identical? if ( !($var == 'this' or $var == 'that') ) { if ($var != 'this' and $var != 'that') {
Ahroun
break the line, change the sign. Looks about right... I know there's a mathematical principle of boolean logic that addresses that... gah! Mcsomthing-or-other.
cyphor
are you talking to me?
Ahroun
DeMorgan's Rule.
Yes.
cyphor
k
what is break the line and change the sign?
Ahroun
cyphor: http://en.wikipedia.org/wiki/De_Morgan%27s_laws
cyphor
(Action) takes a look
fedya_
can i use explode() if i'm trying to split new line delimited stuff in windows? i'm trying to do "\n\n" because there is one blank line between entries
itrebal
fedya_: why couldn't you?
fedya_
can i use explode() if i'm trying to split new line delimited stuff in windows? i'm trying to do "\n\n" because there is one blank line between entries
itrebal
fedya_: why couldn't you?
fedya_
it doesn't work
Ahroun
yay for deja vu.
itrebal
fedya_: then your code is broken
because it does work
fedya_
maybe there's another hidden character between the \n s?
cyphor
if a script creates a non-fetchable directory when a new user account is created to store that user's files, is 0755 for the directory okay?
Ahroun
itrebal, what's the quick-bot thing for explaining \r, \n, and \r\n?
itrebal
doesnt windows use \r\n?
Ahroun: i dunno, i was looking for it :)
ah ha! "(04:32:00 PM) php-bot: Newlines are hidden (not normally visible) control characters that distinguish the end-of-a-line of text and are different for each platform as follows: [Windows=\r\n] [UNIX=\n] [MAC=\r]. And can be seen as: [LF (linefeed) = \n, 10d, 0x0A, 0001010b] [CR (carriage return) = \r, 13d, 0x0D, 0001101b]"
fedya_
ah
\r\n that's it, i coudlnt remember the \r
Miaow
any tips and tricks to get rid of "open_basedir restriction" errors in Plesk?
itrebal
Miaow: not here, go to #plesk or email them
Ahroun
what's the quick-bot thing for package support? *eg*
itrebal
g10 IIRC
Ahroun
oh, wait, I can't use it anyways. Dang.
itrebal
you can do !tell nickname about quickbotthinghere but not the !+quickbotthinghere
mikearthur
Ahroun: could you suggest a regexp to use?
Ahroun
mikearthur: You definately don't want my help with regex. :) I stink at 'em.
mikearthur
as do I :s
FlamingCows
Regex is easy. :|
itrebal
mikearthur: preg_replace('/[^a-z1-9]/i', '', $something);
FlamingCows
What was the question?
Ahroun
Well, politely re-state what it is you're doing and see if someone can help you either generate an appropriate regex or point you in a useful direction. :)
itrebal
err... no it wont
mikearthur: that regex will not work, dont do it - re-post it
scruffy
can someone tell me the difference between pecl and pear? pecl docs don't seem to say.
itrebal
preg_replace('/^[^a-z1-9].$[^a-z1-9]/i', '', $something); that'll do something like 'trim' on anything that isn't a letter/number, right? (only in the beg. and end)
ks
pecl is cooler
mikearthur
so I could say trim all but [A-Z][a-z][1-9]
ks
difference is two last letters
itrebal
scruffy: pecl is compiled modules/extensions of PHP< while PEAR are PHP scripts
FlamingCows
Trim kills /all/ extra whitespace. s/[^\w\d]// would work fine.
scruffy
itrebal: I see.. okay, thanks.
FlamingCows
preg_replace('/[^\w\d]+/','',$str);
mikearthur
nice one
itrebal
(Action) bows to FlamingCows's amazing regex'n skills
scruffy
itrebal: whoops, I'd have noticed if I'd actually looked in the .tar package and seen the C source code! :-)
FlamingCows
I mean, you could just do preg_replace('/\s+/','',$str).
Miaow
itrebal: thanks!
FlamingCows
I don't know how agressive you want to be with this regex.
\s just covers x20, \t, and [\r]\n.
s/x20/0x20/
mikearthur
whats \w cover?
FlamingCows
Word characters.
[A-Za-z0-9_]
Actually, \w\d is redundant.
[^\w\d] simplifies to \W.
mikearthur
k
FlamingCows
That's a lot more aggressive in what it culls than \s, though, as I said.
sigmounte
hi ! I have a problem : date("N",mktime()); give me -->N instead of the day number in the week ?
^Migs^
we bought this $50,000 Java IDE to develop a portal, but I'm thinking it actually would've been -easier- to do the whole thing in PHP
yet still as robust and secure
FlamingCows
You /bought/ a Java IDE?
Big mistake righ there.
^Migs^
licensed one, yes
BEA WebLogic
FlamingCows
SHould have just used Eclipse.
^Migs^
don't know why they didn't just use NetBeans or something
yeah
FlamingCows
NetBeans for teh lose.
^Migs^
WebLogic is nice and all, but...seriously. This portal doesn't really contain anything that makes it easier to develop in Java.
Xyphoid
But hey, someone made a nice commission, would you begrudge them that?
Wilik
holy cow
$50k for a java IDE?
enygma
but it's sexy!
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 next »