<?php
if(stristr($_SERVER['HTTP_USER_AGENT'], "Mobile")){ // if mobile browser
?>
<link rel="stylesheet" href="style-400.css" type="text/css" />
<?php
} else { // desktop browser
?>
<link rel="stylesheet" href="style.css" type="text/css" />
<?php
}
?>
git reset --soft HEAD^
This will reset your index to HEAD^ (the previous commit) but leave your changes in the staging area.FirstName=Mickey&LastName=Mouse
$( "form" ).on( "submit", function( event ) {
event.preventDefault();
console.log( $( this ).serialize() );
});
...upstream sent too big header while reading response header from upstream...
Is fixed by adding these lines:fastcgi_buffers 8 16k; # increase the buffer size for PHP-FTP
fastcgi_buffer_size 32k; # increase the buffer size for PHP-FTP
fastcgi_connect_timeout 60;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
To the site's configuration file:server {
listen 80;
server_name pm.use.ge;
root /var/www/pm.use.ge/public_html;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params; > deny all;
}
}
So that the final configuration file looks like this:server {
listen 80;
server_name pm.use.ge;
root /var/www/pm.use.ge/public_html;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_buffers 8 16k; # increase the buffer size for PHP-FTP
fastcgi_buffer_size 32k; # increase the buffer size for PHP-FTP
fastcgi_connect_timeout 60;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
include fastcgi_params; > deny all;
}
}
<link href="css/d1.m.min.css?t=2.9" rel="stylesheet" media="screen and (max-width: 500px)" type="text/css" />
Another way is to use handheld
on media
attribute<link rel="stylesheet" type="text/css" href="mobile.css" media="handheld"/>
PHP's way to load CSS file for mobile
devicesif(stristr($_SERVER['HTTP_USER_AGENT'], "Mobile")){
echo '<link rel="stylesheet" href="style-400.css" type="text/css" />';
}
Load CSS resource only for desktop<link href="css/d1.min.css?t=2.9" rel="stylesheet" media="screen and (min-width: 501px)" type="text/css" />
Another way is to use screen
on media
attribute<link rel="stylesheet" type="text/css" href="screen.css" media="screen"/>
Using PHPif(!stristr($_SERVER['HTTP_USER_AGENT'], "Mobile")){
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
}
Note: Remember this always loads the d1.m.min.css
but activates it only on screens having max width as 500px
file_put_contents($filePath, $content, FILE_APPEND);
Note: if FILE_APPEND
parameter is not passed, the function overwrites the content.services_cron/asb/log
to create files and write logssudo chmod -R 757 /var/www/html/services_cron/asb/log
MM/DD/YYYY
and Database format is: Y-m-d
how to format your date to the correct for you db.
you can use Carbon
:
use Carbon\Carbon;
start_date = Carbon::parse($request->start_date)->format('Y-m-d');
use carbon function in laravel view(Blade template)
$start_date = \Carbon\Carbon::parse( $item->start_date)->format('m/d/Y');