Category "php"

Laravel set default language not working

I have changed the default website localization in confing/app.php to be (de) 'locale' => 'de', 'fallback_locale' => 'de', But still website is loading

generate an Excel file using PHP

I'm new with PHP, I'm developping a WEB application that display a table with informations from an SQL server DATA BASE, the problem that I want to add a button

php file upload scanning using clamav, permissions on /tmp/

I'm trying to scan files (generally 100MB+ zips) using clamav on apache 2.4, php 5.6, using a socket to the clamav-daemon. I'm not using PHP-FPM. (p.s. the sock

301 Redirect to remove query string on homepage only

I don't have knowledge of .htaccess redirect rules. If a user enters http://example.com?abc=123 or https://example.com?who=123 or https://example.com?xyz=123 th

How to extract price from given url using Xpath?

From a given url I want to extract some detail from it like title, price. For the title, it works fine with this code: <?php $getURL = file_get_contents(

PHP contact form configuration [duplicate]

Hi guys I run my website and it all work except contact us form. HTML <div class="border"></div> <form class="cont

Backend cannot be reached after Typo3 login screen

I am trying to install Typo3 on my Windows 10 computer and everthing goes well. Right after the installation (right before the Typo3 backend is supposed to open

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttp\Psr7\Request

When posting form I am getting this exception Unresolvable dependency resolving [Parameter #0 [ $method ]] in class GuzzleHttp\Psr7\Request Searched and trie

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

I've a form which I'm submitting (through GET as it is required this way) to a crm (ViciDial). I can successfully submit the form however if I do that the proce

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null (SQL: insert into products (name, type, img_url, updated_at, created_at) v

Authentication with (content-type: application/x-wamf)

While I was writing an app to provide stats for one game, I noticed this content type in the login form: content-type: application/x-wamf I never saw it before

laravel controller function parameters

I'm trying to call a function inside one of my controller from the action() helper function. I need to pass a paramter to my function. Here is the funciton I'm

PHP: How to raise number to (tiny) fractional exponent?

I'm doing a calculation in PHP using bcmath, and need to raise e by a fractional exponent. Unfortunately, bcpow() only accepts integer exponents. The exponent i

How to submit a form when page loads using JavaScript?

I know this question has been answered many times but in my case the JavaScript code creates a infinite loop which makes my page load continuously, <script t

How to properly set "0000-00-00 00:00:00" as a DateTime in PHP

I have a column viewedAt which is a DATETIME and accept NULL values. It's a software restriction to set that column on each new record as 0000-00-00 00:00:00 so

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

The relevant code is shown below: var csrfToken = "{{ csrf_token() }}"; xmlhttp.open("POST", "/internal/v1/create/strategy", true); xmlhttp.setRequestHeader('X

how to get the header value, if we don't know the value because the value is random from the server

For example: header name "alphabet" alphabet: abcde next request the value changes from the server alphabet: jkfrts and then continue to change

Wordpress : Load the whole Page using AJAX

I currently using Oxygen Builder in my wordpress, tryna load my other page using AJAX and I'm very very noob at this. Then, i've done some research about it fir

how to check if a string of a number has 10 characters in php

I am struggeling at implementing a check on a textbox. I want to check if the phone number has a length of 10 characters, contains my country base number and if

Swoole process is hanging forever

I have the simplest Swoole code, which sleeps for a second and prints "Run task" message to the screen. <?php namespace Tests\Util; use PHPUnit\Framework\T