Category "php"

For what reason might the camera return the error "Invalid session in request data!"?

The problem is that the error occurs intermittently I have a Dahua HDW2230TP-AS-0280B camera. I back up the video to my server every 10 minutes. The request loo

Access forbidden! Windows 10 PHP XAMPP

Suddenly, i got this error when trying to submit my form. It worked fine until now. Access forbidden! You don't have permission to access the requested

How to display "git blame" in PhpStorm after opening file by default

How to display "git blame" after opening a file by default in PhpStorm. Without "right-click the left gutter, and select the Annotate option", I want to displ

How to map the two arrays with a duplicate value?

I have two arrays. $array1 = ['id_e' =>[91707, 91708]]; $array2 = ['id_s' => [18, 57]]; If I want to insert or delete into the database, I want to make

Convert regular text to array using notepad++

i am trying to use notepad++ to select a new line and replace it with this " ',' ", so that i can use it in PHP as an array and then work on it, but i dont kno

advanced custom fields wordpress custom class

I have a custom field in ACF which is a button that I need to change to a different colour based on what page they are on, so for example Page 1 - Button needs

phpseclib 2.0 can not use Composer to create autoload

I work for a company that has our servers and computer locked down tighter than ... well imagine something really tight. This means I can not use composer or in

WHM Enabling mod_rewrite

I have a CentOS 6.8 w/ WHM on GoDaddy and I have a laravel application. The routes don't work, they return a 404 Not found and because of this I'm assuming it's

How to MODIFY a Google Docs document via API using search-and-replace?

I need an example of how to modify an existing document with existing text in Google Docs via API. The documentation only shows how to insert and delete text, b

Make survey at laravel 5.4 and MySQL

I need to make a survey for my website. I have this: Route: Route::resource('survey','surveyController'); Controller: public function index() { $show=surve

Split array into 4-element chunks then implode into strings

$array = [1, 2, 3, 4, 5, 6, 7, 8, 9]; I want output like ['1, 2, 3, 4', '5, 6, 7, 8', '9'];

Substitute integers and dots with regex [duplicate]

I have the following string and I need to substitute the numbers and dot with a star: FOO_BAR_FOOBA_1_R:FOO_1.0 I tried the following but I j

How to insert data from multiple select dropdown values into database?

I have a multiple select dropdown with checkbox. But I am not sure how to insert it into database and the next time the page opens, it displays the current valu

passing an array to web-service php nusoap

i have a problem with passing an array to a web-service function that i created with php and nusoap. the problem is that i guess i'm doing something wrong.. i s

Log a user out of a website when they put their computer to sleep

This is a bizarre one. We have a Laravel website, and on said site we have a timer per user, where they get 15 minutes of being inactive before being booted. W

Merge key and value of array index [duplicate]

I have an array as follows: ['foo'=>'bar','baz'=>'bat'] im trying to determine an elegant way (not using a standard forloop, prefer lea

Printing more than one array using print_r or any other function in php

I need to print contents of multiple arrays in my code. Eg function performOp($n, $inputArr, $workArr) { printf("Entered function, value of n

preventing abuse of API service usage

I am planning on using Laravel in my next web project, for the backend. Using the Laravel's built-in functionality I will build an API service. So my main conce

Best way to send email to clients from e-commerce website?

I'm building e-commerce website that will sell all kind of items, what is the best way to send emails to clients? Our selling department will send a lot of em

Wordpress 'post_type_link' hides permalink

So I just added a custom post type through the WP-Types plugin, nothing fancy just a custom post type. Now the permalink of this custom post type isn't showing