My project has two entry point for example File 1:/index.php ( first entry point) – here we include the config form the config folder File 2:service/service.php – here we include the config form the config folde if i call the File 2:service/service.php has no fatal error but when i call the File 1…
How can i save all the variable results from a echo into a txt file using php?
I wrote a php script that generates random tokens, and I want to output these tokens into a .txt file. Below is the code: It echos multiple tokens, until the echo = e3b0, but when I try to write the result on a txt file, it only writes “e3b0”, is that a way to write all the results of the
Get an array in a php file from http request
I’m learning php and I’m trying to get a php file from a http request using Guzzle and then just take a particular array from those contents and ignore the rest. But I’m unsure how to get that array. When I print $contents it looks as expected, for example: I want to just get the array, iter…
How to send message to selected user with their name laravel
I’m trying to send a message to selected users with their names. So let’s say I have two users Ethan and Calvin then the message should start like User1:(Hi, Ethan), User2:(Hi, Calvin). So far the message is like (Hi, Ethan,Calvin) for every user. How can I fix this? Blade Controller Answer It loo…
Laravel 7 – paginate sorted by DESC
I’m trying to display posts from the database, but i want to have the latest on top. This means I have to do this inside of my HomeController.php: But when the site grows up, it might be complicated to find the particular post, so I decided to implement pagination. Unfortunately, pagination only works w…
Can’t include js files in php file on cpanel
I am trying to use a JavaScript library (from GitHub) on my website but I can’t get it to work. It works when I set it up in VS code but not when I upload my code to cpanel (along with the required files). The website is a wordpress site so I just create page templates and link the templates
Email body content translation issue in laravel
hello all in my laravel app I have language translation option. English and French. So In my lang folder I have en and fr folders. Each folder I have a file called, sentence.php where I store my …
Developing a Reward Box Algorithm [closed]
I’m trying to build a probability algorithm that will give the user his/her reward based on these probabilities. 1 $ – 60% 2 $ – 25% 5 $ – 12% 10 $ – 1.99% 50 $ – 1% 500 $ – 0.01% How can I do that? …
JQuery update select option
Need a little help on this one. I am trying to write jQuery code to change the selection of a select dropdown. Following the excellent advice on here, I am using .val(). However, this doesn’t remove …
Parsing nested json data to extract a certain value
so I have a nested JSON response form a JSON request I’m having trouble parsing the nested JSON data to get a certain value I have commented out on the data in need ( “link”: “http://i.imgur.com/DnjD527h.gif”) need to extract data in two places see the JSON data for comments. Sin…