@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 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



Comments:

<0> Julian|Work: isn't there another function for this?
<1> Is that possible?
<2> b1n0ry: i know how to do it, thanks
<3> Sepero: Have you read *ALL* of it?
<1> http://www.php.net/manual/en/function.curl-setopt.php
<4> is there a built-in way to return a value from a specified index of an array, or NULL if the index isn't in the array?
<3> Sepero: cURL is what you are looking for.
<2> b1n0ry: 1 234,50 -> 1234.50 AND 1,234.50 -> 1234.50
<1> I'm reading the user posts, but there is quite a bit to read (:)
<4> something equivalent to ( isset($arr[$idx]) ? $arr[$idx] : NULL )
<5> jgarbers: not really, you can do this though: array_key_exists($key, $arr)?$arr[$key]:null
<1> Stormchaser: I truly appreciate your help. I was just wondering if you knew the answer offhand.
<5> it's a little bit different :P
<6> can i define a function inside another function that i could use later anywhere in the script?
<7> can you have two identical functions in a cl*** but one of them normal and one of them is static?
<5> Narada: no



<7> hmm k
<4> ds-: thanks... i already wrote a "peekval" function that does this, but it seems really redundant to do the array lookup twice... thought there was a "cleaner" way
<8> zimnyx: $polish = number_format(str_replace(',','',$english),2,',',' ');
<5> not without getting a E_NOTICE unfortunately :(
<8> zimnyx: $english = number_format(str_replace(' ','',$polish),2,'.',',');
<7> ds-: shame :(
<5> would be a pain in the arse to implement
<5> the static stuff I mean
<9> http://pastebin.com/534224 <- anyone see a problem with that $filename does exist...
<9> but it never p***es the if statement
<3> Sepero: Um... Do you expect me to write the code for you or something?
<5> Stormchaser: if he doesn't expect you to can you write mine for me?
<10> lol
<8> i'm writing a helpdesk system, you can write my code too, Stormchaser
<11> hi all.... best practices question (actually more an HTTP/web server question). Is it legitimate to use the ErrorDocument for non-error uses?
<12> DogWater: I don't see anything obvious. You may want to echo the file name, and check to see if there's any way to get return codes/error messages from file_exists
<9> Why would you write a helpdesk when cerberus is next to perfect
<3> ds-: That's not an option... Kicking you out is, tho
<2> b1n0ry: thank you. i must also asume that polish can be 1.234,50
<8> DogWater because cerberus isn't making me money
<9> take cerberus and change the interface; sell it.
<9> lol
<12> could be permissions, not being aware of the current directory
<5> well it was worth a shot.
<5> mark my words, one of these days I WILL get paid to do nothing
<8> DogWater: besides, i've dealt with a lot of helpdesk software and just think i can do it better
<2> b1n0ry: i'll use preg_replace
<9> schapht: when I echo the filename it says /usr/zones/6.222.206.in-addr.arpa; which does exist if i do an ls
<13> hi
<8> besides, i need to use my 'o' function somewhere
<9> Should i try if (file_exists($filename)) === TRUE {
<8> DogWater or just if(file_exists($filename)) { }
<3> ds-: ONLY if you become a company director :)
<9> b1n0ry: i did that it doesnt work
<12> DogWater: what about permissions?
<13> I begin in php, but I winder if it's normal phpversion() doesn't return anything... (header of phpinfo() shows 5.0.4).
<9> schapht: i'm running the script from CLI as root
<8> DogWater can the user running your webserver see it?
<13> s/winder/wonder/
<9> b1n0ry: running the script from CLI as root
<12> hrm....
<12> there's gotta be something... is your error reporting on at E_ALL? or E_STRICT? even
<8> ok, i gotta go pee, be back in a bit
<9> if i do a ls /usr/zones/6.222.206.in-addr.arpa it shows me info
<12> I'd try that and see what it says
<9> schapht: i dont have it defined in the script itself i suppose its whatever the ini is doing let me look
<12> DogWater: for debugging, I'd just use ini_set to make sure
<12> finally, are you sure that /usr/zones/6.222.206.in-addr.arpa is a file? and not a directory or link to a directory?
<9> -rw-r--r-- 1 root root 17104 Feb 24 2005 /usr/zones/6.222.206.in-
<9> addr.arpa
<11> actually, it dawned on me that my question is better posed in #apache... thanks anyway.
<12> looks right to me
<14> Hm.. I'm starting to really like Jedit
<9> schapht: E_ALL returns nothing
<12> E_ALL | E_STRICT ?
<12> and make sure error reporting is on too
<15> hei
<16> anyone know of any free code profilers?
<9> I have error_reporting(E_ALL);
<17> how hard is it to learn XML, and can I use it like a database for non-sensative information?
<15> when i transfer text via post/get method are slashes set automaticly ?



<12> I'm noticing an interesting thing about clearstatcache() on this page: http://us3.php.net/manual/en/function.file-exists.php
<12> maybe give that a try?
<18> If I want a mysql field to be *not* a,b or c.. is there a way to do a select where fields != a,b,c ?
<12> also the page mentions safe mode restrictions
<9> safe mode is off
<15> too many questions
<17> Man it seems like there's no one here to answer questions heh
<14> Loren: XML in itself is pretty easy. And yes, you can use XML based databases, but make sure you're aware of the overhead you might run into when having to parse.
<17> I'vebeen out of PHP and SQL for a few months
<18> Loren: why not just use a database?
<14> Loren: Just visit w3schools.com and learn. Also, this really isn't a ##php question.
<17> Thanks for the link
<19> he everyone, are there any problems / limitations with running PHP in CGI mode?
<18> Chris`Everitt: just that its slow
<14> Chris`Everitt: Well, it's slower. And it imposes some security glitches (like users being able to override safe_mode and stuff)
<9> wow this doesnt make any sense
<18> DogWater: ?
<20> how can i post to a https:// site from with in my php script?
<21> DogWater: Turn the book around.
<19> hmm, I am hosted with Dreamhost and they seem to run PHP in CGI mode... wondering if I should switch hosts now =/
<12> torgau: to your question, maybe. http://us3.php.net/magic_quotes might explain the situation
<14> torgau: What do you mean by "slashes set automatically"?
<12> DogWater: what happened?
<21> magic quotes
<15> @ holygoat : set slashes before " or '
<9> schapht: i dont know what im supposed to glean from the clearcache function as i am only running a single process per filename.
<14> Chris`Everitt: Why? Are you running into problems?
<14> torgau: You're probably talking about the magic quotes gpc then, follow schapht's link.
<17> quick Q: you said something about there being high overhead in XML, so splitting the files WOULD be a good idea correct? like based on sections of the software
<12> DogWater: me neither really. I'm just trying any avenue possible.
<22> hi
<19> well, only that it does seem somewhat slow... and I just don't really want to run into problems in the future because of it.
<22> how can i get referer site ?
<14> Loren: It really depends on how you want to query your XML
<15> what link ?
<12> roboo: it's in $_SERVER
<14> Loren: Running through a large amount of XML files will also cause a lot of overhead.
<17> HolyGoat: alright, I'll search it up
<17> HolyGoat: dang hmmh
<12> torgau: this one http://us3.php.net/magic_quotes
<9> schapht: trim() wins again
<12> DogWater: you had a space in there, eh?
<12> oh....
<12> you had a \n at the end from the file
<9> schapht: I guess but it wasnt visable nor did i have a newline at the end of the file
<9> by visable i mean in pico
<12> yeah, http://us3.php.net/file has a note about that.
<12> it doesn't take off the \n which would foul up the file_exists
<9> wouldnt that only happen on the final iteration of the foreach?
<9> if in fact there was a blank line at the bottom
<12> well, I'm guessing that file you're reading from had one file per line, right?
<9> right.
<12> so each line has a '\n' at the end
<12> the line break
<9> nice call.
<12> and file() doesn't trim that automatically
<15> thx holygoat
<9> that makes sense
<9> thanks
<12> no problem. Sorry I didn't notice it sooner
<9> now all I have to do is write a function to import zonefiles into mysql :D
<12> have fun :)
<9> yeah; i surely wont
<9> the great part about it is our DNS system hasnt been changed in like 10 years and we have like 4 different file formats
<9> good times
<12> depending on what the zone files look like, there might be some libraries that could help
<9> they're bind 9
<12> I'd google a bit anyway.
<9> yeah; could save myself some time
<9> thanks
<12> no problem
<12> good luck
<13> I'm using php5, but when I write "public $var" in a cl***, I got the error "expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or { in line <public $var> . Is that normal ?
<20> how can i post to a https:// site from with in my php script and p*** variables?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#perl
pixma mp110 can't install
best ldap client
#web
ipw2200-ap driver
#linux
amaranth ubuntu rep
#php
Segmentation fault $MOZ_PROGRAM $MOZ_LANG ${1+$@}
#sql



Home  |  disclaimer  |  contact  |  submit quotes