simlple php question ?

Discussion in 'PHP' started by A.G, Dec 10, 2008.

  1. #1
    Guys can some one here have knowledge in php tell me what the phrase code below mean ?? and what is used for

    @ini_set("memory_limit","12M");

    thanks
     
    A.G, Dec 10, 2008 IP
  2. diligenthost

    diligenthost Peon

    Messages:
    685
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It adjusts PHP memory limit for the given script. Useful if you want to leave the default as such, and fix only a certain script. This can be done through .htaccess as well, some hosts have ini_set disabled, but .htaccess traverses directories, so this will be site-wide beyond the current folder.
     
    diligenthost, Dec 10, 2008 IP
    A.G likes this.
  3. A.G

    A.G Well-Known Member

    Messages:
    2,510
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    150
    #3
    so does this code save memory of the host server , thanks
     
    A.G, Dec 10, 2008 IP
  4. diligenthost

    diligenthost Peon

    Messages:
    685
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No, it merely limits a script from going beyond what you limit it to. The script will use as much memory as needed, but if you reach the limit, it might give you a fatal error - memory exhausted
     
    diligenthost, Dec 10, 2008 IP