Skip to main content
Post Undeleted by Brethlosze
Post Deleted by Brethlosze
Post Undeleted by Brethlosze
Post Deleted by Brethlosze
deleted 667 characters in body
Source Link
Brethlosze
  • 149
  • 1
  • 2
  • 11

For this code:

<?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2]; 
  $post_content     =$argv[3]; 
  $post_excerpt     =$argv[4]; 
  $post_date        =$argv[5]; 
  $post_name        =$argv[6]; 
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
  $post_content     =$_GET['post_content']; 
  $post_excerpt     =$_GET['post_excerpt']; 
  $post_date        =$_GET['post_date']; 
  $post_name        =$_GET['post_name']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
  $post_content='My Post Content';
  $post_excerpt='My Post Excerpt';
  $post_date='2019-01-10T10:10:10';
  $post_name='my-post';
}

echo "Done";
return;

This call throws no errors, warning or notices, and shows the message Done.

https://www.example.com/function.php?post_id=0&post_title=My Post Title&post_content=My Post Content&post_excerpt=My Post Excerpt&post_date=2019-01-10 10:10:10&post_name=my-postTitle

This call

php -f ~/public_html/function.php -- 0 'My Post Title' 'My Post Content' 'My Post Excerpt' '2019-01-10 10:10:10' 'my-post'

throws the following warning and notice, and do not show the message Done:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/wp-includes/load.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at /home/examplecom/public_html/wp-includes/load.php:16) in /home/examplecom/public_html/wp-includes/pluggable.php on line 1223

How should I fix that?

For this code:

<?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2]; 
  $post_content     =$argv[3]; 
  $post_excerpt     =$argv[4]; 
  $post_date        =$argv[5]; 
  $post_name        =$argv[6]; 
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
  $post_content     =$_GET['post_content']; 
  $post_excerpt     =$_GET['post_excerpt']; 
  $post_date        =$_GET['post_date']; 
  $post_name        =$_GET['post_name']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
  $post_content='My Post Content';
  $post_excerpt='My Post Excerpt';
  $post_date='2019-01-10T10:10:10';
  $post_name='my-post';
}

echo "Done";
return;

This call throws no errors, warning or notices, and shows the message Done.

https://www.example.com/function.php?post_id=0&post_title=My Post Title&post_content=My Post Content&post_excerpt=My Post Excerpt&post_date=2019-01-10 10:10:10&post_name=my-post

This call

php -f ~/public_html/function.php -- 0 'My Post Title' 'My Post Content' 'My Post Excerpt' '2019-01-10 10:10:10' 'my-post'

throws the following warning and notice, and do not show the message Done:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/wp-includes/load.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at /home/examplecom/public_html/wp-includes/load.php:16) in /home/examplecom/public_html/wp-includes/pluggable.php on line 1223

How should I fix that?

For this code:

<?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2];
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
}

echo "Done";
return;

This call throws no errors, warning or notices, and shows the message Done.

https://www.example.com/function.php?post_id=0&post_title=My Post Title

This call

php -f ~/public_html/function.php -- 0 'My Post Title'

throws the following warning and notice, and do not show the message Done:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/wp-includes/load.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at /home/examplecom/public_html/wp-includes/load.php:16) in /home/examplecom/public_html/wp-includes/pluggable.php on line 1223

How should I fix that?

deleted 20 characters in body
Source Link
Brethlosze
  • 149
  • 1
  • 2
  • 11

For this code:

<?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2]; 
  $post_content     =$argv[3]; 
  $post_excerpt     =$argv[4]; 
  $post_date        =$argv[5]; 
  $post_name        =$argv[6]; 
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
  $post_content     =$_GET['post_content']; 
  $post_excerpt     =$_GET['post_excerpt']; 
  $post_date        =$_GET['post_date']; 
  $post_name        =$_GET['post_name']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
  $post_content='My Post Content';
  $post_excerpt='My Post Excerpt';
  $post_date='2019-01-10T10:10:10';
  $post_name='my-post';
}

echo "Done";
return;

This call throws no errors, warning or notices, and shows the message Done.

https://www.example.com/function.php?post_id=0&post_title=My Post Title&post_content=My Post Content&post_excerpt=My Post Excerpt&post_date=2019-01-10 10:10:10&post_name=my-post

This call

php -f ~/public_html/main/function.php -- 0 'My Post Title' 'My Post Content' 'My Post Excerpt' '2019-01-10 10:10:10' 'my-post'

throws the following warning and notice, and do not show the message Done:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/main/wp-includes/load.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at /home/examplecom/public_html/main/wp-includes/load.php:16) in /home/examplecom/public_html/main/wp-includes/pluggable.php on line 1223

How should I fix that?

For this code:

<?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2]; 
  $post_content     =$argv[3]; 
  $post_excerpt     =$argv[4]; 
  $post_date        =$argv[5]; 
  $post_name        =$argv[6]; 
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
  $post_content     =$_GET['post_content']; 
  $post_excerpt     =$_GET['post_excerpt']; 
  $post_date        =$_GET['post_date']; 
  $post_name        =$_GET['post_name']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
  $post_content='My Post Content';
  $post_excerpt='My Post Excerpt';
  $post_date='2019-01-10T10:10:10';
  $post_name='my-post';
}

echo "Done";
return;

This call throws no errors, warning or notices.

https://www.example.com/function.php?post_id=0&post_title=My Post Title&post_content=My Post Content&post_excerpt=My Post Excerpt&post_date=2019-01-10 10:10:10&post_name=my-post

This call

php -f ~/public_html/main/function.php -- 0 'My Post Title' 'My Post Content' 'My Post Excerpt' '2019-01-10 10:10:10' 'my-post'

throws the following warning and notice:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/main/wp-includes/load.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at /home/examplecom/public_html/main/wp-includes/load.php:16) in /home/examplecom/public_html/main/wp-includes/pluggable.php on line 1223

How should I fix that?

For this code:

<?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2]; 
  $post_content     =$argv[3]; 
  $post_excerpt     =$argv[4]; 
  $post_date        =$argv[5]; 
  $post_name        =$argv[6]; 
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
  $post_content     =$_GET['post_content']; 
  $post_excerpt     =$_GET['post_excerpt']; 
  $post_date        =$_GET['post_date']; 
  $post_name        =$_GET['post_name']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
  $post_content='My Post Content';
  $post_excerpt='My Post Excerpt';
  $post_date='2019-01-10T10:10:10';
  $post_name='my-post';
}

echo "Done";
return;

This call throws no errors, warning or notices, and shows the message Done.

https://www.example.com/function.php?post_id=0&post_title=My Post Title&post_content=My Post Content&post_excerpt=My Post Excerpt&post_date=2019-01-10 10:10:10&post_name=my-post

This call

php -f ~/public_html/function.php -- 0 'My Post Title' 'My Post Content' 'My Post Excerpt' '2019-01-10 10:10:10' 'my-post'

throws the following warning and notice, and do not show the message Done:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/wp-includes/load.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at /home/examplecom/public_html/wp-includes/load.php:16) in /home/examplecom/public_html/wp-includes/pluggable.php on line 1223

How should I fix that?

added 3 characters in body
Source Link
Brethlosze
  • 149
  • 1
  • 2
  • 11

For this code:

<?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2]; 
  $post_content     =$argv[3]; 
  $post_excerpt     =$argv[4]; 
  $post_date        =$argv[5]; 
  $post_name        =$argv[6]; 
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
  $post_content     =$_GET['post_content']; 
  $post_excerpt     =$_GET['post_excerpt']; 
  $post_date        =$_GET['post_date']; 
  $post_name        =$_GET['post_name']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
  $post_content='My Post Content';
  $post_excerpt='My Post Excerpt';
  $post_date='2019-01-10T10:10:10';
  $post_name='my-post';
}

echo "Done";
return;

This call throws no errors, warning or notices.

https://www.example.com/function.php?post_id=0&post_title=My Post Title&post_content=My Post Content&post_excerpt=My Post Excerpt&post_date=2019-01-10 10:10:10&post_name=my-post

throws no errors, warning or notices.

This call

php -f ~/wwwpublic_html/main/function.php -- 0 'My Post Title' 'My Post Content' 'My Post Excerpt' '2019-01-10 10:10:10' 'my-post'

throws the following warning and notice:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/main/wp-includes/load.php on line 16
 
Warning: Cannot modify header information - headers already sent by (output started at /home/exampleexamplecom/public_html/main/wp-includes/load.php:16) in /home/examplecom/public_html/main/wp-includes/pluggable.php on line 1223

How should I fix that?

For this code:

define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2]; 
  $post_content     =$argv[3]; 
  $post_excerpt     =$argv[4]; 
  $post_date        =$argv[5]; 
  $post_name        =$argv[6]; 
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
  $post_content     =$_GET['post_content']; 
  $post_excerpt     =$_GET['post_excerpt']; 
  $post_date        =$_GET['post_date']; 
  $post_name        =$_GET['post_name']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
  $post_content='My Post Content';
  $post_excerpt='My Post Excerpt';
  $post_date='2019-01-10T10:10:10';
  $post_name='my-post';
}

echo "Done";
return;

This call

https://www.example.com/function.php?post_id=0&post_title=My Post Title&post_content=My Post Content&post_excerpt=My Post Excerpt&post_date=2019-01-10 10:10:10&post_name=my-post

throws no errors, warning or notices.

This call

php -f ~/www/main/function.php -- 0 'My Post Title' 'My Post Content' 'My Post Excerpt' '2019-01-10 10:10:10' 'my-post'

throws the following warning and notice:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/main/wp-includes/load.php on line 16
 
Warning: Cannot modify header information - headers already sent by (output started at /home/example/public_html/main/wp-includes/load.php:16) in /home/examplecom/public_html/main/wp-includes/pluggable.php on line 1223

How should I fix that?

For this code:

<?php
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');

if (PHP_SAPI === 'cli') {
  $post_id          =$argv[1]; 
  $post_title       =$argv[2]; 
  $post_content     =$argv[3]; 
  $post_excerpt     =$argv[4]; 
  $post_date        =$argv[5]; 
  $post_name        =$argv[6]; 
}
else {
  $post_id          =$_GET['post_id']; 
  $post_title       =$_GET['post_title']; 
  $post_content     =$_GET['post_content']; 
  $post_excerpt     =$_GET['post_excerpt']; 
  $post_date        =$_GET['post_date']; 
  $post_name        =$_GET['post_name']; 
}
if (empty($_GET)){
  $post_id = 0;
  $post_title='My Post Title';
  $post_content='My Post Content';
  $post_excerpt='My Post Excerpt';
  $post_date='2019-01-10T10:10:10';
  $post_name='my-post';
}

echo "Done";
return;

This call throws no errors, warning or notices.

https://www.example.com/function.php?post_id=0&post_title=My Post Title&post_content=My Post Content&post_excerpt=My Post Excerpt&post_date=2019-01-10 10:10:10&post_name=my-post

This call

php -f ~/public_html/main/function.php -- 0 'My Post Title' 'My Post Content' 'My Post Excerpt' '2019-01-10 10:10:10' 'my-post'

throws the following warning and notice:

Notice: Undefined index: SERVER_PROTOCOL in /home/examplecom/public_html/main/wp-includes/load.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at /home/examplecom/public_html/main/wp-includes/load.php:16) in /home/examplecom/public_html/main/wp-includes/pluggable.php on line 1223

How should I fix that?

Source Link
Brethlosze
  • 149
  • 1
  • 2
  • 11
Loading