| |
| |
| |
|
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
Comments:
<0> fopen()? fwrite()? <1> dr1: preg_* to parse your templates will take much longer than a nanoseond <2> masquerade: if using your method, there will be no speed increase <3> oh apparently, youd think, but ive not seen good examples of people using the php/html stuff then, because my stuff always seems to end up faster :P <4> FartBreath, do you want to generate it on disk or as the script output? <1> ^Artnez: hah, let's see you pastebin your example and compare it for speed <2> masquerade: i've had the largest sites i've made generate in about 0.002 seconds with the template handler .. and it does laot <5> 0.002? thats fast? <3> for a large site? :P <1> itrebal: hardly, and under heavy load, all the sudden you're at 200.0 <3> that gos either ways <5> lol, i was kidding about that <5> i dunno how long mine takes <3> id love to see a comparison on this, i think the guys using template handlers would have more time to efficiently write the rest of the code, instead of fudging around with the other mess <6> I still prefer a templating system... easy to mantain <2> god.. i love this.. people like masquerade making up numbers
<2> ****, even digg.com uses a template engine <1> I think anyone who thinks there is a need to parse templates with PHP should run along to rails, as you've misunderstood the language <2> masquerade: yea, since you wrote it <6> aah.. masquerade, dont be like that : <6> :) <6> its just a matter of personal preference <5> PHP *is* a template engine of sorts <3> well if thinking outside the box is too difficult, perhaps you should get a new hobby ;) <1> "templating engine" is a very vague term <0> jbpros, I would be saving the style.css on the server for each user <0> each user's website would have its own style.css in their personal subdir <1> PHP is a bloody templating engine <4> FartBreath, then yes use file IO functions <6> checkout this <6> http://pastebin.com/635105 <6> is there anything cleaner? <2> masquerade: it's funny. its sort of like me seeing a million bucks. i saw it, it was right in my eye. then someone like masquerade comes and says "no, a million bucks does not exist". You are telling me **** that i have done never happened. I wrote an application that services 14,000 individuals daily using this system with huge amounts of data being changed and displayed at any given time. The perfomance has been anything but 200.00 <4> 220.00? :D <4> just kidding ;) <2> and the designers here have no problem hopping onboard and making seasonal changes to the template engine without even talking to me about it <3> if it was a big site, youd give yourself a headache making seasonal changes <1> the fact that it works doesn't take away from the original point that doing it is stupid <2> i know you'll never agree, since now we're in 'argument' mode and no one in their right mind would admit they are wrong at this point. all i can say is, thank god we dont work together. i shiver whenever i see code like yours (doing a while loop that calls a functoin that generates global variables that is called by another function inside of the loop to display those values) <1> cutting off my testicals with a rusty knife would stop me from getting someone pregnant, but its stupid. Writing a preprocessor in a language designed as a preprocessor is stupid <2> i'm happy with my clean code that works fast. you can swim in ugly code that works at the same speed and theorize all you want :) <3> i really dont care how people do it as long as it performs good, but i wouldnt want to have to be the guy trying to redesign my site with that code :P <6> A lot of opensource software use templating <6> I dont see what is wrong with that <2> masquerade: actually, it would be a great idea :) but really, your analogy ****s because you would go through immense pain wihile doing so and would probably die. <6> It's just too confortable to say no <6> lol <2> but, if there were no pain involved and no risk to your health whatsoever and you were SURE that you didnt want to get someone pregnant.. why not do it? <2> i would save you the much needed space in your pants for the ego 0_o :P <3> i write my cgi in asm <6> So, now are we talking about cutten testicles? <2> danf_1979: we are talking about people who say something is wrong just because it is.. with no practical reason why -- then making up stupid analogies to boot. <4> danf_1979, I finished compiling eclipse and phpeclipse it's working well. the ebuild installed phpeclipse within /opt/eclipse-extensions-3.1/eclipse/plugins/net.sourceforge.phpeclipse_1.1.7/ <2> and a new guy just starting out could take his talk seriously. reminds of those folk that argue MS servers over Linux <6> OK thanks <4> danf_1979, well /opt/eclipse-extensions-3.1/eclipse/plugins/ to be right <4> danf_1979, I'm going to check the debugger (for the first time ;)) <6> jbpros, how do you select a given plugin from within the program? <4> danf_1979, if it is installed properly, php files should open with the correct highlighting, etc. <4> danf_1979, and you can select the PHP perspective from "Windows -> Open Perspective" <6> Ok <4> can you see that? <4> help, about, plugins details will give you informations about installed plugins, too <6> No, I guess it didn't install ok, but I hated it :) <4> it? <6> This thing pretends that I work on a 400*400 window <6> (Yeah, I know it can be larger, just exaggerating) <6> :) <6> aptitude purge eclipse <4> :D <4> I keep digging into the debugger... maybe this can be useful! <7> hey, all - i keep seeing $var1 =& new Object('options','and_more_options'); my question is this: is the =& a reference to the new object, as in 'address of'? <6> Yeah, I'll keep looking around for an ide <4> dad_, objects are, by default, referenced <8> !+&
<9> [&] & is the PHP 'Reference' operator. See: http://php.net/references; & is Also the PHP bitwise AND operator. See: http://php.net/manual/en/language.operators.bitwise.php <6> I just would like a gedit plugin that would let me see whats going on in real time <8> jbpros: only on PHP5... in PHP4 they are copies <6> gedit interface is nice and simple <4> Stormchaser, yep, right <7> jbpros: so, in this case, = and =& have the same effect? <4> dad_, with PHP5, yes <7> which is the ver. i'm working with. <7> thanks, i was just trying to understand this thing i'd not seen before... <4> dad_, you'd have to use the clone keyword to make a copy of an object <7> jbpros: seems you'd have to work at it to find a situation where you needed to clone an object... <4> dad_, it may be quickly needed <4> dad_, if you want to make a modified copy of a DOM document, for example <7> yes. <7> well, a-codeing we will go... <4> a-codeing? <5> acoding we will go, acoding we will go, high ho acoding we will go <4> excuse my poor english there :$ <10> Hi, anyone here <4> is it some song we sing when walking for long distances? :D <10> I was wondeirng if someone could help me figure out why my upload is not working: http://pastebin.com/635141 <11> S^Gerbitz, 309 lines of code. don't you have any tip for us? <5> jbpros: exactly :) <12> hm <4> I learnt something today, thanks guys! <5> thats rigth <13> ;) <5> grr <5> odd <10> diogo86 - its not uploading the photo that I use <4> S^Gerbitz, thanks for the tip :D <11> S^Gerbitz, do you get any error message? <10> diogo86 - jbpros - on lines 294 - 296 is where hte photo is getting uploaded <10> diogo86 - jbpros - I dont get any errors or nothing <11> S^Gerbitz, what echo do get on line 77 ? <10> diogo86 --- I dont get anything on the screen <11> S^Gerbitz, check apache's error_log <10> I cant <10> its shared hosting <11> S^Gerbitz, at the beginning of your code do this: error_reporting(E_ALL); and try again. <10> diogo86 - ould Not Save file as <10> Error - couldn't insert data into database <10> You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'img_url'); ?>test.gif', '0', '0', '0', '2006', '04', '01', '17: <11> then you have an error in your sql syntax :) <10> diogo86 - can you help me find it <11> S^Gerbitz, doesn't it tell what codeline its from? <10> its here: $imgfile = "<?php echo gethint('img_url'); ?>".$Img; <11> what's gethint() ? <10> thats getting information on line 4 <14> S^Gerbitz: why do you have PHP embedded in PHP? <11> even if you do $imgfile = gethint('img_url') . $Img; and your code works it will still be vulnerable to sql injection... <10> diogo86- I know, I just want it to work right now, I will try to fi xit <6> what does mean a "*" in a regular expression? <11> dan__t, none or many times <6> ok, thanks <4> danf_1979, .* means: anything <11> or at least one time or more.. not sure :P <4> nope, it's none or more <11> ohh <11> + is once or more <4> yep <4> ? is 0 or 1 <6> would this be ok to validate an image name then? <6> preg_match("/^[a-zA-Z0-9\_\-\.]*(\.(gif|jpg|png))$/",$image) <15> In perl, if the subroutine foo() returns an array, I can select the first and third element in that array by (foo())[0,2]. This can later be ***igned to another array or whatever. Is there an equivalent to this functionality in PHP? <4> mmm.. <4> it would match ".gif" <4> do you want that? <6> maybe with {1, 10} <11> maybe with + <6> preg_match("/^[a-zA-Z0-9\_\-\.]{1,10}(\.(gif|jpg|png))$/",$image) <6> ? <4> + is better I think
Return to
#php or Go to some related
logs:
cod2 on unbuntu #asm kde-devel livna Chris62vw ktorrent repo fedora dvddirgen pylab background color #asm $pty->slave;make_slave_controlling_terminal #math
|
|