| |
| |
| |
|
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 33
Comments:
<0> kuja: yes, but I also control the servers it runs on. <0> and, my client likes using <?=$var?> also <0> I allow them to edit templates for the HTML <0> and <?=$var?> is a convenient way to fill in variables <0> and it was the way they even did it before I took over <1> psyon: If you control the servers, then you don't have a problem. If you migrate to servers you don't have control over that may be a problem. Reasons not to use <? apply to the general audience. <2> psyon, I don't see "<?php" ever falling out of use. <1> Also <?php will always be garaunteed to work in PHP. <1> <? will not. <2> I think our point is that even though you may never run into portability (or other) issues, all it takes is using <?php ?> now and you're guaranteed smooth sailing. <3> i feel as though <?= almost breaks the syntax of php :\ <3> it's a shortcut :\ <0> well, again, my main issue is <?=$var?> vs <?php echo $var ?> <2> <?= is a special case though. <0> Rigth. <2> I'm talking <? ?> vs. <?php ?>
<0> bah.. right. <4> 8 extra chars? how often do you use <?= in the first place? <0> Very often. <4> <?= is like "wtf" ... atleast <?php echo makes sense <2> And question... does <?php=$var?> work? <2> Or just <?=$var?> <1> psyon: Think of it this way, if you depend on magic_quotes, register_globals and friends. Your scripts will eventually break, because like short open tags, these will all be removed. They have the same reason not to be used as <? <4> psyon: then you're probably writing ****ty code, try using a template system <1> And while the option remains that they break portability, that's the issue at hand. <2> Goodnight all <5> Ok dokes, guys, I'm redoing my site with php underneath. <0> I never depend on magic_quotes, never depend on register_globals (and disabled it everywhere I can), fixing short tags to long tags though is pretty simple. I could make a perl script to update the code to chagne it. <5> All pages will look like static htmls and I've got that set up. <1> psyon: Sure, but why not use <?php/<?php echo in the first place? Why all the h***le? <3> put a set of holly carbs an titanium exhaust headers in under it too! <5> My goal is to make it so that I can just put the content in one file for each page and have that all included in a finished html output stream. <0> kuja: because the client likes <?= <4> PeterFA: file_get_contents <1> It's really like saying you're going to put bandages on your foot, so why not shoot it first. <3> screw the client, they're not the programmer <5> aidan, where in the php manual would I expect to find that at? <0> jiggster: when they are editing "templates" they are. <3> you can tell i dont work :P <4> PeterFA: php.net/file_get_contents <4> PeterFA: http://hashphp.org/knowledge_base?kb_id=16 <6> aidan: EEK! templating systems... <4> Jymmm: where's that wiki article about it? <3> savant! oh yeah <1> str_replace() is my template engine. If I need performance, pre-caching templates, that's better. <4> savant is the best <4> no need for even str_replace <3> savant is damn nice <3> nice logic to it anyways <6> php , and clear seperation of presentation from logic is my templating system. <1> echo str_replace(array_keys($vars), array_values($vars), $template); <0> kuja: How many page views a day do the sites you work on recieve? We do cache the output after templates are processed, but even with that caching a simple include of a file that contains variables with <?= is much less of a load than even using str_replace() <3> lol <1> You don't need anymore logic in a template than variables/placeholders. <3> go look at savant before you start talkin **** :D <3> :P <1> I've researched PHP templating for about 2 years, I find the above works magnificantly. <1> However, what works best is just pure PHP. <0> kuja: right, pure php, <?=$var?> <0> :P <3> that isnt pure php <1> psyon: No, <?php echo $var ?> <0> :) <1> :P <3> because it relies on short tag syntax which be taken out some day <1> Though, I'm thankful to myself for not using PHP anymore. <0> kuja: I dont even like to admit I know it. <0> I dont look for PHP work, I just happened to end up doing it for people that found out I knew it <3> kuja: lol what do you code in now? <6> yea, php ****s maaan. <1> jiggster: Ruby <3> oh god :\ <1> Trying to learn more Python, though. <1> Ruby will always be my favorite, however. <3> if you add rails to that i'm going to hurl <5> aidan, I've accomplished my goal largely with include :) <1> jiggster: Rails, Nitro, whichever gets the job done.
<3> *hurls* <5> aidan, does include() cause a php file to be executed too? <1> jiggster: Sooner or later, you can expect many companies to migrate to Python or Ruby frameworks. <6> What I've seen of ruby, looks quote nice actually <1> Hell, even caffinated's company migrated to Rails already. <6> but as far as beauty in languages go, Scheme wins in my books, hands down. <7> for the php calendar functions, does anyone know the range for Julian Days? <4> PeterFA: yes <5> aidan, good, thanks. Do you know a quick and dirty way to make a hit counter? <4> brianJP: I'm sure there's a function for that somewhere, php.net/date and pear.php.net/calendar <4> PeterFA: sure, file_get_contents, file_put_contents <5> aidan, with the ability to set the initial count? <0> Im still a fan of PERL... I jsut wish that more servers were configured to run it outside of cgi-bin, and wish mod_perl didnt **** <5> aidan, file_put_contents, thanks. <4> PeterFA: flock, fopen, fwrite, fclose, flock is better <7> aidan, a function that will tell me the range? <0> file_put_contents is new to 5.0 isnt it? <8> fastgi + perl is cool <5> aidan, thanks <4> brianJP: google can tell you that <8> fastcgi even <0> I havent tried fastcgi with perl yet, did it with php on lighttpd <0> works pretty nice <0> I hope PERL 6 embraces teh web a big more. <0> s/big/bit <8> did you manage to get the while loop to work so you could track connections <8> i know it works in perl <0> ummm... not sure what you mean. <8> that loop where you have one process and it keeps track of variables for all connections <1> http://kuja.zapto.org:3000/ -- Rails, http://kuja.zapto.org:5000/ -- Django :D <1> Dead easy to get these working <1> aidan: How's your Python learning coming along? Had enough time? <0> Ive heard good things about Rails, I have to give it a closer look still <8> the fastcgi accept loop <5> How do I put comments in a file? <5> nm, I'll just to html comments <0> oh, never tried rares. <9> can you run a php program that runs as a service and you can interact with it via command line or sockets? <1> Colloid: php.net/socket <10> pear.php.net/Net_Socket <9> do i just let the code live in a loop? <3> what a dull existence that be <5> hmm, is there a tutorial on how to make PHP interface with MySQL? <5> I think that might be a better way to make a hit counter. <1> PeterFA: php.net/mysql <5> Thanks, kuja. <11> is there an equivelant for htmlspecialchars that makes it xhtml compliant? <12> sometimes when I close a socket in php, using socket_close(), the C++ program on the other end, which is the one who owns the listening socket that was used to create the connection, doesnt recv a close signal <13> re <5> How do I test to see if PHP is properly configured to interface with mysql? <1> PeterFA: phpinfo() <7> ok acording to the documentation, "Valid Range for Gregorian Calendar 4714 B.C. to 9999 A.D" but i've tested it and it seems to work up to the year 1465102 can this be relied on on different servers? <5> kuja, thank you. <14> brianJP: are you a vampire? <7> ? <14> ie, do you plan to live that long? :) <7> oh, lol <14> brianJP: 32 bit computers will run out of seconds in 2036 or something like that. <7> i have some very stringent requirements for a calendar project <7> yes for timestamp <7> i'm dealing with julian day <5> active links is 0 in mysql <14> The typical Unix timestamp stores a date and time as a 32-bit signed integer number representing, roughly speaking, the number of seconds since January 1, 1970, and will roll over in 2038 and cause the year 2038 problem. <14> The popular spreadsheet Microsoft Excel stores a date as a number of days since an origin (often erroneously called a Julian date). A Julian date stored in a 16-bit integer will overflow after 65,536 days (approximately 179 years). Unfortunately, the Windows versions of the program by default start at 1900 and the Mac versions by default starts at 1904 (although this can be usually be changed). <14> LOL, go MS. The Microsoft Excel spreadsheet program also had a very elementary Y2K problem: Excel (in both Windows versions and Mac version, when they are set to start at 1900) incorrectly regarded the year 1900, just like the year 2000, as a leap year. In addition, the years 2100, 2200 and so on were regarded as leap years. This bug was fixed in later versions, but since the epoch of the Excel timestamp was set as January 1, 1900 in previous versions, the y <14> leap year to maintain backward compability. <7> interesting <15> anyone around? <1> No <15> =\ <1> Come back 2 hours later. <1> We're discussing something. <15> ...
Return to
#php or Go to some related
logs:
#perl #perl #perl Ellen Kleghorn add windows to grub #linux shlemozzle gentoo jin ebuild Dapper Drake + Nforce 4 javascript in headers
|
|