Category: Php
Redirecting to a specific page or website url in php
Redirecting to a specific page or website url in php header(“Location : siteurl.php”);... Read MoreAllowed memory size of bytes exhausted (tried to allocate bytes) in php
Just add this below line to before line of you getting error in your php or config file ini_set('memory_limit', '-1'); Here are two simple methods to increase the limit on shared hosting: If yo... Read MoreHow to get whole part of a number in php
<?php $num=7.05; echo floor($num); ?>... Read MoreCode to copy video iframe code once clicking a button in php
Using javascript define a fucntion: function copy(content) { var aux = document.createElement(“input”); var var1='<video width=”640″ height=”440″ controls>... Read MoreCode to copy text once clicking a button
Using javascript define a fucntion: function copy(url) { var inputing_var = document.createElement(“input”); inputing_var.setAttribute(“value”, url); document.body.appendChild(... Read MoreTo get Structured data using print_r statement
To get structured data while printing a variable in php, first print a “pre” statement: Then print variable. echo “<pre>”; print_r($var);... Read MoreDifference between break and exit
Break : Exit from the current loop it executing. Exit: Exit from the entire program after exit calling.... Read MoreCross domain issue in php
Use below code on the top of page with other domains URL. <?php header(“Access-Control-Allow-Origin: http://sample.com”); ?> If you want to add multiple cross domains add as follows:... Read More- 4 of 4
- « Previous
- 1
- 2
- 3
- 4