PHP Tutorials and Examples for Beginners
Best Practice to PHP Output PDF to Browser Directly – PHP Tutorial
To make browser show pdf file, we can use html embed or open a pdf url by browser. However, these two methods of displaying pdf file is hard to make some control, for example, if we only want to valid user to read pdf, how to control? To do this, we need output pdf file by php script. In this tutorial, we will show you how to do.
A Simple Way to Set PHP Page Only Allow HTTP Post Method Request – PHP Tutorial
Understand WebP Image Mime Type and PHP Output it in Browser Directly – PHP Tutorial
Force Download HTML and TXT Files in PHP – PHP Tutorial
Best Practice to Enable Chrome Reader Mode – Chrome Tips
A Simple Way to Get File Extension in PHP – PHP Tutorial
Best Practice to Calculate Directory Size in PHP – PHP Tutorial
To calculate a directory size in php, there are some methods:1.If you are using windows system, you can use php to parse dir command. Meanwhile, if your pc is linux, you also can parse du command. 2.Iterate size of all files in this directory and sum them. In this tutorial, we will introduce using method 2 to calculate a directory size using php.