Code Test

myURL = "https://someurl.com/dir/page.html"
URLparts = myURL.rpartition('/')
print(URLparts[0])
print(myURL.rpartition("/")[0])
print(URLparts)

Turn on PHP error reporting

To display error messages caused by your PHP script you can include these lines of code:

ini_set('display_errors',1); 
 error_reporting(E_ALL);

Another way to do it is to edit your php.ini file and include this option:

error_reporting = E_ALL

To turn error reporting off for a single document, include this line:

error_reporting(0);
Posted in: PHP

PHP keywords

http://php.net/manual/en/reserved.keywords.php

Posted in: PHP