| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Comments:
<0> is Zope outdated compared to PHP? <1> yarden: bad choice of example <1> oops, didn't scroll down all the way <0> anyone? <1> dbe: Zope is completely different <2> sloloem: try something like <img\s+.*?src="([^"]*)"(?:\s+.*|\s*)> <0> GarethAdams, can summarize a comparsion please <0> can you* <1> PHP is a server side language. Zope is an Application Server for systems written in the Python language <3> Is it possible to list all the methods in an object? <1> dbe: a kind of framework for applications, although it's usually used for web applications <0> GarethAdams, which of them is more cost effective? can PHP do the most things that Zope can <1> you can't compare them directly like that <0> GarethAdams, ok <4> jbpros, that posix or pcre? <2> sloloem: pcre
<4> cool <0> GarethAdams, fsf.org using Plone (which using Zope), why do they dont use PHP do you think? <4> So $pattern = '/<img\s+.*?src="([^"]*)"(?:\s+.*|\s*)>/';? <1> dbe: why don't you email them and ask? <1> PHP is a language, you can do a lot of things with it. <1> Zope is a framework, a lot of common tasks already have functions written to handle them <2> sloloem: yup <4> I'll give it a shot <1> so you odn't have to rewrite the basic functionality you'd need for most applications <0> GarethAdams, ok, so when is Zope typically used? <2> sloloem: not tested but should capture the src value <5> I'm using switch. Is it possible for a "case" to be something like "case > 10000:" when I wanna check if the variable is bigger than a value? <4> How would I tweak it to work with an alt=? <6> dbe: it's an application server that's used for web applications. Examples: Plone and CPS. <2> sloloem: replace the 3 letters src with alt <1> dbe: first, you should compare the benefits of a framework over not using a framework. *then* you can start with the PHP vs Python debate <2> <img\s+.*?(?:src|alt)="([^"]*)"(?:\s+.*|\s*)> <4> I man add it in. <1> dbe: http://en.wikipedia.org/wiki/Framework <4> my tags have both <2> sloloem: and you need to capture both values? <4> They're the same, I only want one. <2> sloloem: then use the last regex I gave you <6> dbe: people who haven't had to write the types of applications that Zope excels at wouldn't know the issues and eventually end up reinventing Zope and realize why they should have used Zope in the first place. <7> with php/mysql its easy to enter a huge row of information, with multiple columns, but I can't seem to figure out how to update multiple columns at once <4> The idea is I have "Just doing a test of the integration of the news poster thingie into the admin panel. <img src=\"img/29.gif\" alt=\"Smiley#29\" />" and want the whole img thing to become s:29; <7> Woul dit be easier to delete the row and use an Insert INTO o rsomething? <8> hi <8> i have an if statement, but if it doesnt work then how can i make the else not do nething <7> if (ask == "true") {echo "do this";} else {echo "do that";} <8> rukie <8> what if i dont WANT anything to happen <8> i dont want to echo anything <8> on the else <9> then don't make the else <7> then just if (ask=="true") {echo "do that";) <7> and don't put the "else" in <8> ok <10> $result = preg_replace("(http)://.+", "<a href=\"\\0\">\\0</a>", $contenidohtml); <10> what is wrong with thtat? <7> join #mysql <7> er <11> sanmarcos: You haven't got start/end delimiters <6> rukie: delete then update would be a totally lame way of doing it. How would you deal with referential integrity constraints if you deleted? Try this from a mysql shell: update yourTable set col1 = 'foo, col2 = 'bar' where someColumn = 'baz'; That just updated two columns. Adjust recipe as necessary. <11> sanmarcos: Try "#http://.+#" note that the + will match untill the end of the string <7> and that has to be in row where id = $_POST['guid'] <12> if i'm uploading a file i get all the coordinates into $_FILES but what if i wanna upload 2 or more files? <7> do I just put a WHERE at the end? <10> bubblenut: start end delimiters? <0> Zope is framwork but so is ZEND so what is the differences more then that Zope is an application server? <6> rukie: these are basic SQL questions. You really ought to learn SQL first before trying to implement it in PHP. <11> sanmarcos: take a look at the pcre documentation at php.net, you need to mark the beginning and the end of the pattern, in the example above I used the # character <7> well I'm looking around and I can't find how to update multiple instances at the same time, all I can find are UPDATE table SET guid = 4 where guid = 5 <11> sanmarcos: prehapse "#http://\S+#" would work better, this will match up to the first space (the end of the url) <13> rukie: Try #sql or #mysql <7> UPDATE table SET guid = 4, title = hello, desc = bye WHERE guid = 6 <7> alright <6> rukie: "multiple instances"... what's that? <10> bubblenut: I thought it was \s <13> sanmarcos: no, \s is space <11> sanmarcos: \s matches all space characters \S matches all non-space characters therefore it will match up until the first space character and no further
<10> oh ok <7> information in different cells, I've got 1 row with say, 6 columns, and I want to update all th einformation in that row. <10> $result = preg_replace("#http://(\S+)#", "<a href=\"\\0\">\\0</a>", $contenidohtml); <6> dbe: Zend and Zope aren't the same things. There may be some areas of overlap but they really focus on solving different problems. You have some reading to do I think :) <14> Is there a simple way of removing ALL kinds of whitespaces? Linebreaks, spaces and so on ? <13> Jemt: trim() <15> im havin a problem with a php config script, it needs GD libs for graphics, phpinfo says I got the libs but the script says it still needs them. <14> Stormchaser: As far as I know, it only strips whitespaces in the beginning and in the end <11> Jemt: str_replace(array(" ", "\t", "\r", "\n"), "", $string) ? <14> bubblenut: I was thinking on that too - but will it for sure remove ALL whitespaces? To my knowledge, ie Windows Notepad uses \b <11> Jemt: try it, alternatively you could try preg_replace("#\s#", "", $string) <14> bubblenut: What does #\s# do ? <13> Jemt: php.net/pcre <14> Checking <11> Tuzlo: Can you pastebin the relevant part of the phpinfo and the error you're getting from your script? <15> bubble, sure, gimme a min <11> Jemt: Matches whitespace characters. Although the preg_replace will be slower <14> Ah, ok. Thanks :) <15> bubblenut: there a way to get an output of any errors? <13> any error caused by what? <10> can somebody type an exclamation sign? <11> ! <13> woof! <10> thanks <11> wtf? <10> my keyboard is broken <13> That was... disturbing... <15> LOL <15> pastebin is some slow <11> aahh, ok, say what you want emphasised and I'll do the exclamation mark then, ready? <13> Tuzlo: still? Then use hashphp.org <6> How can I invoke a function in a PHP module from a PHP code fragment on a page? Are all PHP functions in the global namespace? <15> bubblenut: http://hashphp.org/pastebin.php?pid=6786 <15> doubt thats enough info for you <11> Not really a PHP question so you may have to bitch-slap me, but can anyone suggest a nice, bare-bones linux distro for an old desktop being used as a test server? <11> Tuzlo: .. and what's the error you're getting from the page? <13> bubblenut: Debian <11> Tuzlo: ... or is it just not working as expected? <16> hmm, I'm stuck... ;( <16> why is this not working? exec("python /home/ftp/blendistribute/programs/callsplit.py $uploadfile"); <6> Eleaf: permissions? <16> $uploadfile is a variable that is p***ed on to the python program as an argument <15> its tellim me that the GD lib isnt up to the right version <11> Stormchaser: That's what I'm running on it at the moment, Sarge - unstable but I'm having problems compiling 5.1.4 on it, also, PDO doesn't seem to work right either (refuses to bind parameters on INSERTs and UPDATEs) <15> An invalid server configuration has been detected. Please correct any problems above before continuing. <15> and the only one highlighted is GD Lib <13> bubblenut: I hear the current PDO has a few problems... <16> cilkay, I'm not sure. The directory has the most lenient permissions on my entire computer.. It should be usable by absolutely anybody. <11> Tuzlo: Can you pastebin the exact PHP error please? <11> Stormchaser: :( I thought that might be the case, oh well, thanks <6> Eleaf: is the executable bit set on callsplit.py? <15> im not gettin an error code persay, it returns it in the script, is there a way to get errors from php? <17> mm2000... i need some more help :) <16> cilkay, I can execute it in a terminal fine. <11> Tuzlo: error_reporting(E_ALL); ? <15> in the php thats the issue? <16> cilkay, chmodd'd it to 777, still doesn't work <16> (it doesn't print any error from php, it just doesn't do what the program is asked to do. <17> mm20000: my code = http://www.mypastebin.com/?code=1798558244 , however it only works when i login with the 1st user (harleyg), if i try the 2nd i added: harleyg1 it doesnt work <6> Eleaf: has to be your PHP syntax then. I don't know PHP but I know Unix and Python so you've tapped the extent of my relevant knowledge. <18> what is your favorrite editor? <13> /dev/urandom <16> hmm <16> I want it to run the python program, and have a php variable be an arguement for the python program. <16> I'm not sure if my $uploadfile variable is being p***ed on... <18> what is your favorrite editor? <15> bubblenut: out that in the script thats havin the issues? <19> oh eldu again ;) u haven't tried xargs yet :P <20> Does PHP support a construct similar to Python's try...finally? <13> yarden: Stop it... This isn't an editor channel <13> !tell PerL_MonK about u <19> damn it, once more <13> urf <13> Dwonis: php 5 does... PHP4 doesn't
Return to
#php or Go to some related
logs:
ubuntu qpopper connection refused erowid vantin ubunto bashrc prompt too long #perl driver nw122nxt01 WTF nachos #math InvalidCo without-sqlite+rpm howto cpuspeedy
|
|