เมื่อใช้ function readfile(); ใน php แต่ php.ini ตั้งไว้
memory_limit = 24M ; Maximum amount of memory a script may consume (8MB)
เมื่อไฟล์มีขนาดใหญ่มากเกิน 24M ไฟล์จะถูกตัดออก อ่านเข้ามาใน program ได้เพียง 24MB
วิธีการแก้ไข
แก้เป็น
max_execution_time = 1800 ; Maximum execution time of each script, in seconds
max_input_time = 1800; Maximum amount of time each script may spend parsing request data
memory_limit = 500M ; Maximum amount of memory a script may consume (8MB)
หมายถึงตัว Task Scheduler ของ Windows จะไปเรียกไฟล์ sendmailforss.php ด้วย php.exe
5). ขั้นตอนสุดท้าย กด Finish
6.) จะได้งานใหม่ขึ้นมาดังรูป
ให้ double click ที่งานนั้น
แล้วเลือกเป็น Run whether user is logged on or not เพราะ server อาจจะ Log off เมื่อหน้าจอนิ่ง แต่เราก็อยากให้งานที่เราตั้งไว้ทำงาน และเลือก Do not store password. The task will only have access to local computer resources ดังรูป จากนั้นกด OK
If you intend to create a back up of your database in Server A and restore it on a Server B, here’s how to go about it. Create a .bak file (Open SSMS > Database > Right Click your database > Tasks > BackUp > Specify the destination).
Once the .bak is created, copy this file from Server A to a Server B. We will assume that the file has been copied at the location ”C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\” at Server B. It can any location that you desire.
How to restore the .bak file
Use this query:
RESTORE DATABASE [SouthWind]
FROM DISK = ‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\South.BAK’
WITH REPLACE,
MOVE ‘SouthWind_Data’ TO ‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\SouthWind_Data.MDF’,
MOVE ‘SouthWind_Log’ TO ‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\SouthWind_Log.LDF’
where FromDisk is where the .bak file is kept on Server B and MOVE specifies the location of the data and log file.