The online racing simulator
Simple PHP question
2
(46 posts, started )
New question, Dygear, why did you use the curly braces { around that variable?
It allows you to use variables in-place, without having to close double-quotes first.

i.e. you can do the above instead of:

<?php 
$mailbody 
.= "IP Address " $_SERVER['REMOTE_ADDR'] . "\n";
?>

However, if you did the following, "$_SERVER['REMOTE_ADDR']" would be interpreted as a string instead of as a variable to be substituted.

<?php 
$mailbody 
.="IP Address $_SERVER['REMOTE_ADDR']\n";
?>

So, Dygear's post contains an 'alternative' solution (though, the top example in this post is the most efficient double-quote method).
Ahh, Excellent.

Now if I wasn't a complete moron and could figure out this damn POS javascript shit, I'd be happy.
#29 - arco
Does anyone know of a good free editor they can recommend? I'm currently using Notepad++, but is just wondering if there's something else and maybe better out there.
I'm using SciTE.
Quote from the_angry_angel :Vim is my editor of choice these days, be it gVim, MacVim or Vim (http://www.vim.org/)

Vi is a bitch and shouldn't be allowed. Pico I can cope with for simple tasks, but I never got around to learning the shortcuts in Vi and I still don't even know how to exit the editor!

Emacs is a bag of shit too. I don't care how many anoraks tell me it's coding nirvana, it's still Emacs and I still don't want to know. Emacs is like perl - it's a behemoth that needs to be destroyed.
Kev, are you sober enough to send that registry key, so I can give that text editor a proper try?
Not sure why you need it (assuming weird Mac witchcraft) but here's the PHP document class key from my installation:
Attached files
Texpad_PHP.zip - 627 B - 138 views
Well, I could use DarWINE if I wanted to, or I could simply reboot into Windows and then get infected by infectious diseases again.

Thanks Kev
Quote from the_angry_angel :Vim is my editor of choice these days, be it gVim, MacVim or Vim (http://www.vim.org/)

Cream's quite a nice extended gVim if using on windoze.

I used UEdit for years on windoze but have decided to split things up into coding categories and use more "specialised tools", now I use NuSphere PHPEd for PHP, Komodo for Perl and UEdit for general editing. Vim where I can on a *nix box, but Vi will suffice or if running X, Anjuta was quite nice. Used to use Joe 4-5 years ago, but it core dumped a lot.

For PHP, PHPEd pretty much wears the crown IMO.



Regards,

Ian


PS:

TNIT: A few choices to quit Vi(m) heh:

:q (exit)
:q! (forced exit, don't prompt about changes)
:x (exit and save changes)
:x! (forced exit and save changes, read-only files etc)
:qa(!)
:xa(!)

Last 2 as above, but will perform the same on all open files, exclamation optional

Once you know the common codes, it's really no more complicated than remembering the likes of ctrl+s to save IMO
Quote from Bob Smith :I'm using SciTE.

I like, SciTE, but it never really kept me coming back.
I used gEdit on Linux, and I loved that, the text was just so soft and easy on the eyes.
I use Notepad2 on Windows, and it does what I need it to do.
#39 - arco
Quote from thisnameistaken :Vi is a bitch and shouldn't be allowed. Pico I can cope with for simple tasks, but I never got around to learning the shortcuts in Vi and I still don't even know how to exit the editor!

I remember my first encounter with it in the early Linux days. Was hard enough finding how to start editing, but exiting the program was the worst. No matter what key combos I tried, the damn thing wouldn't exit. I think I ended up with rebooting the computer just to get out of it.


I've never run it on a local box, only ever on remote servers where it was the only editor available. Each time I've been forced to use it I've just closed my console when I was done and left it to do whatever it does when you just close the console.
Quote from thisnameistaken :Vi is a bitch and shouldn't be allowed. Pico I can cope with for simple tasks, but I never got around to learning the shortcuts in Vi and I still don't even know how to exit the editor!

I'll give you that on first glance Vi(m) is complicated to use. I won't deny it, however once you get used to it the handy things you can do all from the keyboard outweigh the simplicity of alternatives like nano, pico, etc. I spend a lot of my time remotely connected to servers, both Windows and unix-like, both with very fast connections and very slow connections. Apps like Vi(m) just work perfectly regardless at the end of the day, hence why I had put time into it.

The sad thing I occasionally find myself trying to save things by using the various shortcuts, in other programs

Quote from thisnameistaken :Emacs is a bag of shit too. I don't care how many anoraks tell me it's coding nirvana, it's still Emacs and I still don't want to know. Emacs is like perl - it's a behemoth that needs to be destroyed.

I'm with you on Emacs though. Whilst similiarly complicated as Vi(m) I don't see any benefit for the massive number of plugins to it. It strikes me much like eclipse - just too much.

Quote from Ian.H :Cream's quite a nice extended gVim if using on windoze.

I shall check it out

Quote from Ian.H :For PHP, PHPEd pretty much wears the crown IMO.

Now it's funny you say that. Many years ago I used to use very early versions of PHPed and swore by it. Fantastic little application in it's day, but the whole integrate IDE thing started getting on my tits.. Do you feel it's still worth using in this day?
Quote from the_angry_angel :

[ snip ]

Now it's funny you say that. Many years ago I used to use very early versions of PHPed and swore by it. Fantastic little application in it's day, but the whole integrate IDE thing started getting on my tits.. Do you feel it's still worth using in this day?

I don't use all of the features (I don't use many of the debugging ones, one plus for an IDE I guess) but some I do like over "normal text editors".. such as the code explorer and navigators, project handling and ability to upload / download / sync via FTP or SSH. I develop remotely 100% of the time (even if on a local server as windoze for server environments just doesn't work) so these couple of features are handy to save flicking through various windows.

The other feature which I reckon is probably pretty sweet would be the NuSOAP client. I haven't touched SOAP before, but am working on a project at work currently that does use it and I'll more than likely have to get intimate with it soon, so it might be a useful feature.

The DB Client is also useful for quick checks for things (not really looked into it much, but handy if you just need to remind yaself what fields are available in a table for an SQL statement without having to load up an SQL client of some ilk).

I certainly haven't regretted moving over to it after using UEdit for many years. The project handling / code explorer as present in most other IDEs to me makes it worth it alone. UEStudio does have the same ability, but it's not as well handled as PHPEd as it's primarily for compiled language development IMO.. and almost anything is better than Dreamweaver (just thinking of alternatives that may have a similar(ish) feature set).



Regards,

Ian
Quote from Ian.H :I haven't touched SOAP before...

... and we can smell you from here!

Quote from dawesdust_12 :... and we can smell you from here!


Damn! And I thought I'd done enough with the 1/4 of a can of deodorant this morning



Regards,

Ian
I never really saw the point of SOAP. I mean, I like XML and all, but sending it across as a communication mechanism is just ... greedy (From the resource stand point [If (Want / Have) = >1] Is you shit out of luck.) and obtuse. I guess it's really for people who want one decoder (parser) for all of their projects. The problem still maintains that you still have to write the encoder.
Quote from Dygear :I never really saw the point of SOAP. I mean, I like XML and all, but sending it across as a communication mechanism is just ... greedy (From the resource stand point [If (Want / Have) = >1] Is you shit out of luck.) and obtuse. I guess it's really for people who want one decoder (parser) for all of their projects. The problem still maintains that you still have to write the encoder.

Tbh, I really don't know too much (yet) about how it functions at work.

We provide 2 services: A mail platform for anyone from an individual to the many UK ISPs we host and an e-mail to / from fax service. I think the SOAP setup is for the fax side of things.

I do know that we provide an API to ISPs / resellers which is where this comes into play I _think_, as to why etc, I really don't know. The only bits I've looked at briefly are within the internal control panel I'm working on / taken over (interesting project to cut me teeth on XML (properly) / XLST / Ajax)

Maybe it has something to do with the multiple platforms we use (both Unix and Mac).

No doubt I'll find out the reasons as time goes on, but I should do some reading up on it before hand I guess



Regards,

Ian
2

Simple PHP question
(46 posts, started )
FGED GREDG RDFGDR GSFDG