It is very often a developer or programmer want to know the system/server variable of a server that without their right to access to the server back-end.
With ASP.Net, you could get the server variable through scripting.
When you need these information from your IIS based server, create a aspx file named variable and place the script as below based on C# or VB.
<% @ Page Language="VB" %>
For Each var as String in Request.ServerVariables
Response.Write(var & " " & Request(var) & "<br>")
<% @ Page Language="C#" %>
foreach (string var in Request.ServerVariables)
Response.Write(var + " " + Request[var] + "<br>");
Well Done, hope this is useful for the programmer.
The VI editor is screen-based editor used by many Linux users. The VI editor is designed through C programming and it is useful to aid programmer.
To start using the vi editor, simply type “vi” from the terminal and this will allow you to enter the vi editor. If you are opening a file, you shall see the status as below.
“filename” 1 lines, 1 characters
If you are creating a new file, you will see the following status.
“filename” [New file]
To exit from vi editor, you should press Esc or ^] (control + ]) then enter :q to exit. Sometimes, you have modified something but do not want to save it, you may use :q! command.
If you have modified some script and want to save it, use :wq to save it or you may use the short-cut key of ZZ.
To understand more, refer to the image as below.
If you are using Secure Shell (SSH), you might get these error when you running your php script.
PHP Fatal error: Out of memory (allocated 20447232) (tried to allocate 4096 bytes) in email.php
If you are the programmer or system administrator, you might tried to increase the memory_limit from the php.ini or using ini_set to increase the memory_limit but you will find out no matter how much memory_limit you set will not solve the problem.
The reason of the error occurs is not because of the PHP memory_limit usage of your script, but it is because the jailed shell limitation.
With cPanel jailed shell, the problem could caused by the forkbomb setting of your cPanel limited the PHP memory.
You may easily get this fix by modify the file as detail below where you should change the user to the cPanel user of your account.
if [ “$LIMITUSER” != “root” ]; then
Then modify the ulimit “-m 200000” to “-m unlimited” and save it.
As a web designer, programmer, system administrator, etc. It is good to know what is a file type of file before you open it.
Browse to the http://www.whatisthatfile.com/, you will get the page and type in any file type such as html, htm, asp, php, etc. You will get the result as detail below.
Nowadays, Programmer rarely know that .Net Framework could actually do the rewrite through the .Net URL Rewrite itself without using the third-party application to call the .htaccess rules from Apache and do not need to use APE to run the rules.
But do you know that with URL Rewrite rules that applied to the web.config file, you could actually call it externally without messed up such as the .htaccess.
By right, the format of the URL rewrite rules could as simply as below.
<add key= “/ oldurl” value=”/newurl” />
<add key= “/ otheroldurl” value=”/othernewurl” />
You could applied the above rules to your web.config file, however you could do the below calling function from external file.
<rewriteMaps configSource=”rewritemaps.config” />
We named the another file called rewritemaps.config, and you may applied all of the rewrite rules over there.