Results 1 to 9 of 9

Thread: logo in php

  1. #1
    Join Date
    Aug 2009
    Posts
    74
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default logo in php

    hello All,

    Iam doing a program in php.I completed it successfully now what i want is i want to make an icon for that application and when i click on that, it should open the application.Is this possible in Php

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,024
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Could do with a bit more info - do you mean to run a function or actually open an new application (.php page) window?

    If you're asking for a php equivelant to javascript's onclick="DoFunction();" action, then no, there isnt one (php is server-side, javascript is client-side)

    But if you're asking if you can insert HTML into a php file to display your logo image, then yes, just use the usual <a href="my_application.php"><img src="path/to/image/my_logo.jpg" height="100" width="100" alt="logo" /></a> code and wrap it in hyperlinked anchor tags to open your application.php page.

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    ...are you doing a desktop application in php? or a web app?

  4. #4
    Join Date
    Aug 2009
    Posts
    74
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default

    thnks for ur reply ,


    iam doing desktop application so i want to place an icon relating to that.

  5. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    I thought you might be doing a desktop app, the way you worded it. But, sorry, I'm not sure how that would work.

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You will need a .ico file and a way to attach this to your program. The easiest way would be to use your compiler if there is an option, such as compile test.php -i:icon.ico (rough guess about the format), if your compiler supports that.
    If your compiler does not, then you will need to find a way to change the icon of an .exe that is already compiled. I don't know if this is possible, but if it is I think you can find shareware/freeware for it. Try searching google for "set icon .exe" and have some patience-- you'll get a lot of useless results (mostly for creating .ico files-- but you might need that too), and probably some that work.

    Note: this question is completely unrelated to PHP (as code), and only related to your compiler and how windows works with .exe files. You might find more help at a desktop programming forum if needed. Most users here don't use PHP to create desktop applications (and most people who DO create desktop applications don't use PHP). I've done a very small amount, but I don't know very much about it except that PHP is very slow and usually not the right language for desktop programming.


    I don't know what compiler you are using, but there may be no reason not to use bambalam:
    http://www.bambalam.se/bamcompile/
    It's free and supports icons (in the format I used above).
    This is the compiler I've used for PHP. It works well, at least for basic programs.
    Daniel - Freelance Web Design | <?php?> | <html>| espaņol | Deutsch | italiano | portuguęs | catalā | un peu de franįais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. The Following User Says Thank You to djr33 For This Useful Post:

    traq (07-06-2010)

  8. #7
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    the whole idea of desktop php is mildly exciting for me... my initial reaction is "wow, awesome, I'd love to try that!", but then my sense of practicality comes in: I don't have any needs for a desktop app, no experience in writing them at all (not since 5th grade when we did stuff like 10 IF X = 42 GOTO 40
    20 X = X + 1
    30 GOTO 10
    40 PRINT "X equals 42"
    , anyway), and, beyond that, I get the feeling that if I ever get into desktop programs, there's probably a better place to start than php.

    That compiler is pretty cool-looking, though.

  9. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I've used it and tried a few things. It works, but it's slow.
    I was using the GD library at one point to do some filters for images, and I created an .exe that would run through all of the images in a folder and apply it to all of them then save the output files. GD is inefficient and running PHP as a desktop app is inefficient, but aside from that it was good and did what I needed. The main advantage of running it there instead of my server was that it could run for hours (literally) without the problems of doing that on a server. And I could use files locally rather than uploading them.
    Other things I've tried are a file encryptor (just for fun but it worked) and an FTP uploader (using PHP's ftp functions). I wanted to get the ftp uploader to be more useful (as it was, I compiled the filename and destination into the program), but never got a chance.
    The main problem is that the compiler is simple and doesn't have many options for input/output, etc. It actually does have these options, but it's complicated and would as you say be easier to do it using another language. Since I don't know another language, though, it's better than nothing and fun to play with.

    As a completely random note, at least with bambalam, you can compile an include then keep the rest as text (included.php). So I found this a good way to test things (mostly image manipulations), and this might be a good way to test some complex algorithm locally rather than dealing with it on your server.
    Daniel - Freelance Web Design | <?php?> | <html>| espaņol | Deutsch | italiano | portuguęs | catalā | un peu de franįais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. The Following User Says Thank You to djr33 For This Useful Post:

    hemi (07-01-2010)

  11. #9
    Join Date
    Aug 2009
    Posts
    74
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default

    well, thanks for suggestion. This was really helpfull

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •