I’m using a fetch request and I want to detect a location header in the response so that I can react differently depending on if there is a location header as follows: fetch(request) .then(response => { for(var keyValPair of response.headers.entries()) { alert(keyValPair[0]); if(keyValPair[0] === ‘Location’) { alert(‘TRYING TO RELOCATE’); window.location.replace(keyValPair[1]); return; } } if(response.ok) { ..

Read more

I have been working on AdminLTE and trying to customize it. However I wasnt able to get my Jquery scripts for search bars work one of them wasn’t important at all but last one is kind of curicial so I need to get it solved. <?php @session_start(); @ob_start(); define("DATA","data/"); define("SAYFA","include/"); define("MYCLASS","class/"); include_once(DATA."connection.php"); define("SITE",$siteURL); ?> <!DOCTYPE ..

Read more

I have a PHP script executed via php /dir2/main.php while on /dir1 as a working directory. They both have identical file and the include_path is set to /dir2 however if the file is missing I would expect require(‘file’) to throw an error but instead /dir1/file is loaded even though it’s not in the include_path var_dump(get_include_path()) ..

Read more

I would like to have an h1 tag that displays the current file name. For example, in the blade file "index.blade.php", I would like to have an h1 tag that displays "index.blade.php". I have tried doing using {{__FILE__}} but that prints out the cached blade file and not the actual name // index.blade.php <h1>{{__FILE__}}</h1> Result: ..

Read more

I uploaded a photo form PC using Facebook’s Graph API as mention in https://developers.facebook.com/docs/graph-api/resumable-upload-api The response form the server was: {"h": "2:::GCX1lgT2HE96k4EBABVmzuUrKpIEbugbAAAP:e:1614641018:953016678564535:106376874831684:ARY9xbszYdCO90XbXTE"} which is a "file handle". How can I publish the uploaded photo using that file handler? Sourc..

Read more