I am trying to include a php file in a page via I am getting an error I changed allow_url_include=1 in the php.ini and that worked but I don’t think that everybody will let me change their php.ini file. So, is there any way to accomplish this? Answer The warning is generated because you are using a full…
How to check if a folder exists before creating it in laravel?
I need to know if a folder exists before creating it, this is because I store pictures inside and I fear that the pictures are deleted if overwrite the folder. The code I have to create a folder is …
Can’t install phpDocumentor via Composer
In composer.json I’ve got It’s what is there because I’m trying to install phpDocumentor into an isolated folder with ./composer.phar install command. But what I’m getting is Answer The error message indicates that you are missing the XSL extension in your PHP setup. You can see http:/…
SNMP DateAndTime hex-string convert to human date in PHP
When i want to get the cablemodem event log via SNMP, then i snmpwalk the ‘mib-2.69.1.5.8.1’ oid, but I had the problem because the SNMP store every event date in ‘special’ hex-string called DateAndTime format. (In my case this is a 8 byte hex-string, like this: 07 B2 01 01 00 0A 14 00…
Way to generate virtual mac address in PHP
I am working on web application where I will need to generate demo mac address for each record. There will be plenty of records for which I will need demo mac address. So how to generate unique mac address using PHP? Note – I don’t want exact mac address – I will need something unique like m…
How to json_encode $GLOBALS?
I’m trying to debug a PHP application, and as a section of the debug process, I passed print_r($GLOBALS) through the AJAX request to my browser. However, I’d prefer to see it in native JSON form because it comes out better in the browser. I’m trying to use the following snippet of code: but …
Laravel routes aren’t working with 1&1 [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question Many many many topics about this, but I have to say that none are helping me a great deal. I …
get meta description , title and image from url like facebook link sharing
my code is function getTitle($Url){ $str = file_get_contents($Url); if(strlen($str)>0){ preg_match(“/(.*)/”,$str,$…
PHP – Black background after resizing transparent png and gif
I am using the below code to resize images. When transparent images, (png/gif) are uploaded the new images created have black background. How can i make the background white after resizing? pls help …
PHP hide fatal error message and redirect
If the following code returns a fatal error, I get a message on the page I don’t want users to see. I want to hide the fatal error message and redirect the user to another page: To hide the error message, I just added: But how do I catch and redirect a fatal error like this? Answer Basicaly, you canR…