pdo - how to fix Allowed memory size PHP -
this question has answer here:
i following error: fatal error: allowed memory size of 134217728 bytes exhausted (tried allocate 65488 bytes).
<?php session_start(); require'class/db.php'; $db = new clsdb(); $getrows = $db->getrows("select * category"); echo "<form method=\"post\" action=\"category.php\"> <table>"; while($row = $getrows->fetch()){ ?> <tr><td><input type="checkbox" name="checkbox[]" value="<?php echo $row['catid'] ?>"><?php echo $row['catname'];?></td> <br /> </tr> <?php } ?> </table> <input type="submit" name="delete" value="delete"> </form> <?php if(isset($_post['delete'])) { foreach ($_post['checkbox'] $check) { //$deleterow = $db->deleterow("delete category catid ='" . $check . "' "); $deleterow = $db->deleterow("delete category catid = ? ", $check); } } ?>
this line got error
public function deleterow($query, $params = []){ $this->deleterow($query, $params); }
the line db class
i don't know how fix problem please leave helpful
you can adjust memory limit:
ini_set('memory_limit', '128m');
change size per requirement
Comments
Post a Comment