I have the files test.html, test.js and test.php in my directory. I am trying to send some data to my backend, which should be dealt with by test.php. I run my server using PHP’s built-in webserver with the command php -S 0.0.0.0:8080 -t test-server/. Here’s a simplified demonstration, whenever I click “submit”, it should send the data to my php
Tag: httprequest
Handling PHP URL and GET requests
I am currently parsing any given url, for example example.com/page/1 or example.com/api/info/1, by exploding the URL: and then accessing its elements in the array like so: But how could I handle (and access via array in the same way) a url that also includes GET elements, such as example.com/page?id=1 or example.com/api/info?=hello ? I am using nginx and trying files like
Laravel patch method not supported (even on update method)
HTML PATCHING FORM {{ Form::model($model , [ ‘route’ => [‘admin.friendship.update’, $model->id] , ‘class’=>’needs-validation ajax-form’, ‘method’ => ‘post’ ]) }} @…
Numeration of documents on PHP
PHP, Laravel 6.0: I can’t write a working static function or a variable for getting numeration of my documents with increment. Every time I create a document it should set its number (Document #1, #2, …
Best way to manage long-running php script?
I have a PHP script that takes a long time (5-30 minutes) to complete. Just in case it matters, the script is using curl to scrape data from another server. This is the reason it’s taking so long; it has to wait for each page to load before processing it and moving to the next. I want to be able