Skip to content

Tag: php

Send PHP Error if No Rows Created

I’m trying to prevent duplicate rows from being created. My current statement works, meaning it prevents duplicates from being created, but it always returns the execution as a success, meaning I don’t get an “error” message if no rows were created. Thanks I would like to fail the sql …

Create custom function for upload and insert data

Is there any chance that I can create a custom function for upload? I have 2 function which are insert_content() and insert_officials. In that function there is a code for uploading image. How will I do that since they have the same code of config. Answer Just make a function and put it in a model or somethin…

how to “regex” all options in select menu

The sample data is this: With the following code I can capture only one data: How can I capture all data to “SIZExSIZE” (e.g 50×80 or 150×230) and “Stock: [0-9]” until the last Select. Answer Just change (.*) by ([sS]*?)</select> so the complete regexp would be: <sel…

Ckeditor 5 file uploading adapter error

I’m using ckeditor classic 5, and i’m trying to upload images in it. I downloaded php lib Ckfinder3 php connector, set config. When i’m trying to load image i have a massage: Cannot upload file *filename*. Interesting moment, that they are fisically loaded on server: i can view it in directo…

Debugging Laravel application on VSCode

Has anyone successfully configured VSCode to debug Laravel-based website? After having followed numerous articles and tutorials, I have made it to the point where I can ask VSCode to “Listen to XDEBUG”, but I haven’t been able to do normal VS-style debugging where I could just hit F5 to laun…