Jump to content

itaym02

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

About itaym02

  • Birthday 04/13/1972

Contact Methods

  • Website URL
    http://phpancake.sourceforge.net

Profile Information

  • Gender
    Male
  • Location
    Isreel

itaym02's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a site with tens of thousands of users. I need to implement some kind of private messaging system. I thinking about simply install an email server and use the imap extenstion to work against it, as if it was a DB of messages. Is my approach the correct one, or is it shooting way over the target, and I need to do it using my DB and in the old way (say, like in phpBB or here).
  2. Can you give us the larger picture, as there might be a different approach to your problem. Think of an algorithm that scans one char at a time, and marks when a PHP tag is opened, it's place in the file and it type, and the same for closing tags. This way you would know which PHP tags are opened and do not have content in them, and which PHP tags are closed without first being opened. Some edge cases I can think off of the tip of my mind. <?php //?> echo 'watch out'; ?> <? echo 'watch out, if this is the last line in the file, then this is legit.'; <?='ggg'?>
  3. Have no sleeve answer for you, just notice it is a common practice to leave unclosed PHP tags. This is done to avoid problems with white spaces. Now your problem becomes more complicated :-)
  4. Net Beans or Eclipse+ the PHP plugin give you good service, just make sure your computer is either strong (or running on *nix)
  5. Echo the sql one line before you run it. Take that string and run it manually on the DB (easiest in the SQL panel of phpmyadmin). I guess this will show you the real error.
  6. You can set the includes path to point to the directory of this config (and on the way to your library of code) and from then on, just use the file name in the include command.
  7. I started using Zend Framework a year ago. Have no such problems and almost no includes in my project. Using theire autoload and naming conventions.
  8. Oh, Come on, use full paths...
  9. It searches the file in the directory of the main script (the one you put it's name in the browser). I guess that the file is not in that directory, but rather in the directory of the included file. I like to use absolute paths, and so does Accelerators.
  10. I am biased, as I am an ex-Zender, you can guess what I recommend (and what I use).
  11. In that case SESSION is the wrong choice! If you really think you need a superglobal variable (which, in most cases is a bad idea). Simply define it in the global scope (outside all function and classes) and then call it anywhere in the script like that: $GLOBAL['var_name']
  12. I tend to use a library like Zend Framwork when working with forms, abstracts much of the work. Since you are a veteran .net it will be easy for you to get the idea. But, as a basic thing, I used to write my forms like that: <form method='post' action=''> <input type='text' name='myname' value='<?php echo $_POST['myname']; ?>' /> ... ... ... <input type='submit' value='save' /> </form>
  13. The scenario: A "forgot my password" for is filled with email. On submission email is sent to the user. Due to the way ZF is working, the email is sent in the controller, before anything is thrown to the browser. This makes it look like after the submission the site is stuck (if it takes a long time to send the email). Is there a way to echo a message to the screen, on the lines "Your request is being taken care of...". I can use AJAX to submit this request, I can use cron to send the emails at a later time... But I was wondering if there is a good way to do it built in ZF?
  14. What is the path to your Zend folder? And put here the code of the bootstrap file you use.
  15. This would be a good way to check if an update occurred or not. Since you have no PHP error, it seems you query is not good. Echo the query you try to run (do not write it yourself, it is important you echo it) just before the call to mysql, and see why it does not update anything.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.