Skip to content

Tag: php

PHP 8.0.12 Error Reporting Not Showing All Errors

I’m trying to move an application to PHP 8 from PHP 7. But whenever there’s an error in my code, only the first error is displayed, even if there’s a fatal error after that first error. error_reporting is set to E_ALL, display_errors and display_startup_errors are on. For example, Only the e…

How to crawl page in PHP?

I get the error: “error code: 1020″. The page I’m trying to crawl for form data is: https://v2.gcchmc.org/medical-status-search/. This is my code: $initial = file_get_contents(‘https://v2.gcchmc.org/medical-status-search/’); $check = preg_replace(‘/.+?input type=”hidd…

Is there a method in PHP to use a varible as all or part of a classname?

Example The goal is to have a dynamic variable which changes the appended string based on folder names found in a directory. Answer It is possible to use PHP to write a file that contains a class definition and then include or require that file. The newly created class could have a name based on a variable. S…

Error: Expected Literal, got ‘*’ in Doctrine

I want to retrieve the number of rows in my courrier table. In my fixtures, I have these lines : I have these mistakes when I do symfony console doctrine:fixtures:load : What’s wrong with the * in my query ? Answer Doctrine expects you to use one of the fields of your entity. In SQL you don’t need…

Laravel (How do I add data to database)

Here’s my code that shows projects assigned to a user. HomeController home.blade.php ProjectController that show issues within the project. route: issues.blade.php I made a button in the issues page that shows a modal that has a form for adding issues for the selected project. Can you help me with this?…