Category "php"

Laravel: HTML in notification

I'm using the default notification system (Laravel 5.3) to send an email. I want to add HTML tags in message. This does not work (it displays the strong tags in

PHP -> Next nearest date defined by array of days in week

please, really need help with this problem. I have array of offerDays - $offerDays = array(1,6); (mean Monday, and Saturday); For example, input date is Wedne

PHP PDO using bindParam first argument without colon [duplicate]

check this please $user_id = (int)$_GET['user_id']; $sql = 'DELETE FROM users WHERE user_id=:user_id'; $query = $db->prepare($sql);

Docker Nginx + PHP-FPM Error Fastcgi Header

I am creating a PHP(Phalcon) project, using docker compose. The image is tailored based on the webdevops project. In our production, staging, and my own machine

Pass an image through AJAX [duplicate]

Basically I want to pass a image file with ajax on submitting a form and retrieve the image and send it by email as an attachment file: Here'

Limit of log line written to Apache Errorlog from mod php error_log

I have a simple setup of apache 2.4 + mod_php as web server. The error_log directive in php.ini is not set so it takes on the default value of 0. The behaviour

PHP Sorting - getting 10, 11, 12 ... 1, 20, 2 rather than 1, 10, 11, 12 ... 2, 20

I have parameters like this that need to be sorted (Note: I am sorting AFTER converting the key=>value combinations to strings): $param['SignatureMethod']

Debugging Stripe Webhook Event

I spend my weekend trying to figure out Stripe Webhooks, but still haven't found a way to debug the response. This is my current code: http_response_code(200);

Whats the point of running Laravel with the command 'php artisan serve'?

I dont seem to understand why we need to run a Laravel app with php artisan serve vs just running it with Apache or nginx. I know that under development, we use

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

I have a column in a table that I want to use for an unique-index. My script should make the data unique by concat the id of a record, if the data of current re

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

My data in database: My objective is to retrieve all data of company collection (MongoDB) data from the database. The company collection holds one or many truc

How to use React Router with Laravel?

I needing use React Router with a Laravel project. But when I create router on the React Router and try access, Laravel accuse Route not exist error. How to c

Symfony 4: "Autowire: you should configure its value explicitly."

I'm starting to working with Symfony4 and I meet the following error when I try to run my server: Cannot autowire service "App\Controller\CharacterInformation":

Assets not referencing to public folder (Laravel)

I have the public folder inside my laravel project and I have some js and css files inside it. I'm using the asset function and even though it's referencing t

Search for array row with specific column value and return another value from qualifying row

I have a multidimensional array that I am trying to search for a specific value (url) and then retrieve an another value in the same row (value). I also need to

Unable to Edit config.inc.php

Running: macOS High Sierra Version 10.13.3, zsh w/ iTerm2 Trying to set up a local environment with xampp, which has worked just fine for me in the past. Howe

PHPExcel How to set conditional formatting to change cell background color based on cells values

Good morning, I need to set cells background colors using PHPExcel, but I don't know how to do it. This is for my header and It's working: $styleArray = arr

Is there any built in function in javascript/jquery to filter email like php's function (!filter_var($variablePassed, FILTER_VALIDATE_EMAIL))

// check if e-mail address is well-formed if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Invalid email format"; } This code is filtering

307 temporarily moved code when page loads in Chrome

I have run into a dilemma I cannot figure out. All my pages (currently being served on both localhost & a live server) redirect twice with a 307 header code

Firebase Security Rules Storage from specific web url

I want to set the security rules of the storage to be that only data that send from my web (specific web url) can be stored. Otherwise no one can write and read