@# 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 30 31 32



Comments:

<0> or include, or fopen
<1> oh, oops
<2> file_put_contents is php5
<1> thought it was..
<3> (PHP 4 >= 4.3.0, PHP 5)
<4> my php files are downloaded instead of run, help (local host)
<1> ah, i see caffinated
<1> halibut: php isn't isntalled correctly
<1> what server?
<3> halibut- probably missing a line in your web server config
<2> !tell halibut about at
<5> Dragnslcr: well I dont need to read the actrual data from the url
<1> sutabi: that's still the easiest way to do it
<4> is that apache config?
<3> You don't have to use the return value if you don't want
<1> unless you're trying to send your user to a website with a get var



<3> You could just use fopen instead
<2> halibut: your private message explains what you need to do
<3> Ooh, file_get_contents got more parameters in 5.1
<6> wow, Zend Studio isn't too bad
<4> it still trys to download them caffinated
<7> ^Migs^: Well, I would say it's bad in the same way every other IDE I've ever seen is bad.
<6> why are you always so negative?
<8> why are you always so positive?
<8> heh, j/p
<6> it's not so much that you're negative. You just always feel the need to offer an alternate viewpoint.
<7> ^Migs^: Truly criminal, that.
<6> if I said it was horrible, you'd point out some good qualities of it. I say it's good, so you have to put a negative spin on it
<6> it annoys me, because I'm the exact same way.
<8> helps give balance?
<7> God forbid other points of view are shared.
<7> Although I have very little good to say about ZDE, except perhaps about its debugger, which is decent.
<7> Probably the only reason I bother opening it, really.
<1> ^Migs^: the only way to avoid that is to not miss anything the first time around
<1> but since people are lazy, they understand
<6> PHP will have better IDEs as it continues to mature
<9> hey guys i think i aldrady saw a mysql_? function that would execute a query and return the value of the first field of the first row automatically with one line, anybody which funciton this is?
<10> http://php.net/mysql
<6> if it's not there, there's not one
<7> Well, whatever else may be good or bad about it, I do have to give it kudos for having a commandline option to send/receive all its data as marshalled python objects.. :)
<7> That almost makes up for it being proprietary.
<1> StaZ[home]: try mysql_result(mysql_query(" ... "), 0, 0);
<11> I am looking for a way to get the name of a directory.... the php file is in say /folder1/folder2/file.php and I want a way for the php code to echo "folder1".. how can I do this?\
<9> tempest1 that's what i wanted thanks
<1> rtoris: you just want the root directory?
<11> its not the root no
<12> folder1?
<11> there's more before folder one
<1> eh?
<12> $array = explode("/", $path)
<12> echo array[0];
<13> is there a function to validate time/date input? (in a certain format)
<1> array_pop(reverse(explode("/", $str)));
<11> ill fool around with that
<12> Nope, my example was wrong...
<11> it doesn't work?
<12> $string = "/folder1/folder2/file.php";
<12> $string = explode("/", $string);
<12> echo $string[1];
<12> there you go...
<12> :)
<11> well see here's the read deal
<11> folder1/folder2 will change every time
<11> im isntalling something in a bunch of different folders
<12> so you do:
<11> so I wanted to automate the naming of the site
<12> $string = explode("/", $paths);
<12> echo $string[1];
<13> i got disconnected (again!) and don't know if my message p***ed through, so I repeat it: is there a function to validate time/date input? (in a certain format)
<14> rtoris: php.net/dirname
<12> where $paths, always change
<15> hi, q: $i = 1; $j = !$i, why does $j not become 0?
<12> sorry, rocofocofor|eat^ could you provide more code?
<11> thanks
<16> rocofocofor|eat^: it's false
<16> ! is a boolean operator



<16> it converts $i to true
<16> and then negate it
<12> dirname does not do the trick
<12> $string = "/folder1/folder2/file.php";
<12> echo dirname($string);
<12> gives:
<12> . /folder1/folder2
<16> what's the problem danf_1979?
<16> oh, ok I did read
<12> :)
<14> danf_1979: Yours isn't exactly failproof either.
<14> You would need DIRECTORY_SEPARATOR and preg_split()
<15> maver:i see thanks, is there a numeric invert opreator?
<16> rocofocofor|eat^: operator "-" :-)
<16> what do you mean by "invert" ?
<12> Could you provide an example where my code fails?
<10> Bitwise invert is ~, positive/negative invert is -
<14> danf_1979: $str = 'C:\foo\bar\baz\qux.txt'
<17> hellooooooooooooooooooooooooooooooooooo
<6> uh
<14> danf_1979: $str = '////foo/bar/baz'
<12> well... ofcourse... as it would fail in @#~@#~-/dir
<18> Hey guys -- I have a quick question. I have an array -- $array. Within the first element of the array $array[0] it will be a value of "testing" or a value of "testing.com" or "testing.net" etc. Of course, "testing" could be anything, and ".net" or ".com" could be one of any TLD..
<18> ...either way -- I'm trying to figure out how to decipher if the element includes the TLD or if it doesn't. IE: either it includes ".xxx" or not..what's the way to do this?
<17> does somebody know a doc about developping a cache system on web site ?
<16> rocofocofor|eat^: $i=1; $j = (int)(!$i);
<6> pathinfo with extension?
<12> he said this was the structure: "/folder1/folder2/file.php";
<12> so my code is ok
<6> I dunno
<14> Yes, ^Migs^ is right, pathinfo() may work.
<2> danf_1979: your code is not ok, because it doesn't really address cross-platform paths. kuja is correct.
<6> well, www.testing.com may cause problems
<12> caffinated, the guy wanted folder1 as result...
<15> mave: i just want to invert 1 into 0, and vice versa, damn i cant even get ~ bitwise oprator to work
<12> just folder1
<6> just use string functions to strip all but everything after the last .com/.net
<14> ^Migs^: Given that it
<14> ^Migs^: Given that it's any possible TLD...
<2> danf_1979: yep, and if that path ever changes over to a non-unix/linux system, it'll outright fail.
<16> rocofocofor|eat^: $foo = (int)(!$foo);
<12> Well, that if of yours, it's an if only
<2> danf_1979: an easily avoidable if.
<6> I'm sure there's a better way, but I'm just not up to devoting my brain cells to it at the moment. Caught me at a bad time.
<15> maver: thanks lol :S
<14> ****, you don't even need an `if' :)
<2> always write code cross-platformm if you don't know where it's going to run
<12> Ok, agreed, that does not prove my code wrong
<12> agreed?
<6> code can be proven wrong?
<2> i don't need to prove your code wrong. from a 'will work in this instance' point of view, it's fine. from a 'will work in every instance' it's broken.
<16> people, relax yourself :D
<6> error-ridden, perhaps, but wrong?
<12> yes, ofcourse
<12> I never said it would work on windows
<12> it was a matter of looking the explode
<12> was it?
<11> so lets say I have www.blah.com/one/two/three/four/file.php and I wanted "two" what should I do? I still don't get what I want
<2> rtoris: http://php.net/explode - read.
<14> I need a smoke.
<12> mee to
<6> a smoke needs you
<14> Hey caffinated, bye caffinated =) ... brb :)
<18> Does anyone have any ideas that can at least help me
<16> ***yKen: www.php.net/preg_match
<6> what do you think we were talking about this whole time, ***yKen?
<18> Migs -- when?
<6> immediately after you asked the question right up to this very point
<2> why does everyone suggest regex at the first sign of needing to match a substring?
<16> caffinated: cause it's cool :P
<2> wise up people, a regex should almost never be your first choice
<6> why not?


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#python
error: C preprocessor /lib/cpp fails sanity chec
SciSet returned failure
elmo909
#mysql
BBFILE_PATTERN
remove ClamScanned
sb128 installing ubuntu
php chwon
unknown attr+ clearpassword



Home  |  disclaimer  |  contact  |  submit quotes