Skip to content

Call to undefined method but it is defined and it works in index.php?

I have a small php project with OOP. I have 3 Klasse that represent the Objects User.php Transaction.php and BankAccount.php. They work fine if I’m in the index.php but as soon i go to an other site it states: The project structure is like this app/public models Database.php User.php Transaction.php Ban…

How to remove NaN from array in PHP?

How do I remove NaN values from an array in php? To remove any other element, I found this solution, but I can’t get it to work for NaN. https://stackoverflow.com/a/7225113/9606753 Context: I am reading data from an rrd Database. I want to calculate the mean across several data entries, however at least…

How to submit a POST using tag?

I realize we need forms to submit a POST or perhaps with the help of a button. However, how do we do it using tags? Example code: I’m trying use PHP to read a text file for a number of variables (names of each picture that I’ve saved). From the text file, this PHP will then convert the variables i…

Laravel URL Filtering with GET

I am building a simple Laravel routing to display an array when someone goes to http://127.0.0.1:8000/planets But I need to make a filter to check the array on what request has been send on the URL. For example: http://127.0.0.1:8000/planets?planet=mars I need to make sure that if a GET parameter is present, …

Pass variable from PHP to Powershell script

I am trying to pass a variable from PHP to a powershell script. My PHP code is : And I am trying to capture it in powershell using : The $txt is a string variable as I can write it in a txt file from PHP. I do not know exactly where I am wrong as the powershell is executed.

Unable to post angular form data using web api

contact.component.html contact.component.ts api.service.ts create.php I am new in angular and I am simply trying to insert angular form data in mysql using web api. Now, What happen here when I try to read data from database it work perfectly and all data are showing in my console. But when I fill form data t…

Enter button gets trigrred while enter new line in input form

im working on a project where a user can describe his location in multiple lines but when i press enter button for new line in input form it gets submitted into database. i feel myself stucked here. help me to get rid of this please my html code is: and my php code is : please help me Answer Instead