fix: Removed files accidentally added on PR 27489 (#35469)
This commit is contained in:
@ -1,11 +0,0 @@
|
||||
---
|
||||
title: Cookies
|
||||
---
|
||||
## Cookies
|
||||
|
||||
Definition: A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values. The name of the cookie is automatically assigned to a variable of the same name.
|
||||
|
||||
|
||||
#### More Information:
|
||||
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
||||
- [PHP setcookie() Function](https://www.w3schools.com/php/func_http_setcookie.asp)
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
title: Date
|
||||
---
|
||||
## Date
|
||||
|
||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/php/functions/date/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
||||
|
||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
||||
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
|
||||
#### More Information:
|
||||
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
@ -1,19 +0,0 @@
|
||||
---
|
||||
title: Die and Exit
|
||||
---
|
||||
## Die and Exit
|
||||
|
||||
The `die()` and `exit()` functions are identical. They each take one argument (a string) containing an error message. Upon being run they output the message and immediately halt execution of the script.
|
||||
|
||||
```PHP
|
||||
<?php
|
||||
die('Die() function was run');
|
||||
```
|
||||
```PHP
|
||||
<?php
|
||||
exit('Exit() function was run');
|
||||
```
|
||||
|
||||
#### More Information:
|
||||
* <a href="https://secure.php.net/manual/en/function.die.php" rel="nofollow">php.net die() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.exit.php" rel="nofollow">php.net exit() manual</a>
|
@ -1,36 +0,0 @@
|
||||
---
|
||||
title: Echo and Print
|
||||
---
|
||||
## Echo and Print
|
||||
The echo and print functions provide a way to write out the value of a variable or argument to the screen.
|
||||
|
||||
### echo
|
||||
The `echo()` function writes out the value of a variable or argument to the screen.
|
||||
```PHP
|
||||
<?php
|
||||
echo "freeCodeCamp";
|
||||
```
|
||||
NOTE: A short hand way to open the PHP tag and echo is <?=
|
||||
```
|
||||
<?= "freeCodeCamp"; ?>
|
||||
```
|
||||
|
||||
### print
|
||||
The `print()` function out the value of a variable or argument to the screen.
|
||||
```PHP
|
||||
<?php
|
||||
print "freeCodeCamp";
|
||||
```
|
||||
|
||||
### print_r
|
||||
The `print_r()` function writes out the value of any variable (such as an array) or argument to the screen, unlike the echo or print functions which are more limited.
|
||||
```PHP
|
||||
<?php
|
||||
$freecodecamp = "freeCodeCamp";
|
||||
print_r($freecodecamp);
|
||||
```
|
||||
|
||||
#### More Information:
|
||||
* <a href="https://secure.php.net/manual/en/function.echo.php" rel="nofollow">php.net echo() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.print.php" rel="nofollow">php.net print() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.print-r.php" rel="nofollow">php.net print_r() manual</a>
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
title: File Reading
|
||||
---
|
||||
## File Reading
|
||||
|
||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/php/functions/files/reading/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
||||
|
||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
||||
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
|
||||
#### More Information:
|
||||
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
title: File Uploading
|
||||
---
|
||||
## File Uploading
|
||||
|
||||
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/php/functions/files/uploading/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
|
||||
|
||||
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
|
||||
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
|
||||
#### More Information:
|
||||
<!-- Please add any articles you think might be helpful to read before writing the article -->
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
title: Files
|
||||
---
|
||||
## Files
|
||||
|
||||
PHP provides several functions for working with files. These functions allow the developer to enable user file uploads, for php to read and use data from a file, and lastly for php to write data to a file.
|
||||
|
||||
#### More Information:
|
||||
* <a href="https://secure.php.net/manual/en/function.readfile.php" rel="nofollow">php.net readfile() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.fopen.php" rel="nofollow">php.net fopen() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.fread.php" rel="nofollow">php.net fread() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.fclose.php" rel="nofollow">php.net fclose() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.fgets.php" rel="nofollow">php.net fgets() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.feof.php" rel="nofollow">php.net feof() manual</a>
|
||||
* <a href="https://secure.php.net/manual/en/function.fgetc.php" rel="nofollow">php.net fgetc() manual</a>
|
@ -1,52 +0,0 @@
|
||||
---
|
||||
title: Functions
|
||||
---
|
||||
|
||||
## PHP Functions Introduction
|
||||
|
||||
A function is a block of statements that can be used repeatedly in a program.
|
||||
|
||||
### Simple Function + Call
|
||||
|
||||
```php
|
||||
function say_hello() {
|
||||
return "Hello!";
|
||||
}
|
||||
|
||||
echo say_hello();
|
||||
```
|
||||
|
||||
### Simple Function + Parameter + Call
|
||||
|
||||
```php
|
||||
function say_hello($friend) {
|
||||
return "Hello " . $friend . "!";
|
||||
}
|
||||
|
||||
echo say_hello('Tommy');
|
||||
```
|
||||
|
||||
### strtoupper - Makes all Chars BIGGER AND BIGGER!
|
||||
|
||||
```php
|
||||
function makeItBIG($a_lot_of_names) {
|
||||
foreach($a_lot_of_names as $the_simpsons) {
|
||||
$BIG[] = strtoupper($the_simpsons);
|
||||
}
|
||||
return $BIG;
|
||||
}
|
||||
|
||||
$a_lot_of_names = ['Homer', 'Marge', 'Bart', 'Maggy', 'Lisa'];
|
||||
var_dump(makeItBIG($a_lot_of_names));
|
||||
```
|
||||
## strtolower Function
|
||||
The strtolower() function converts a string to lowercase.
|
||||
```
|
||||
<?php
|
||||
echo strtolower("Hello WORLD."); //hello world.
|
||||
?>
|
||||
```
|
||||
|
||||
#### More Information:
|
||||
|
||||
* <a href="https://secure.php.net/manual/en/functions.user-defined.php">php.net user defined functions manual</a>
|
@ -1,18 +0,0 @@
|
||||
---
|
||||
title: Time
|
||||
---
|
||||
## Time
|
||||
|
||||
The `time()` function returns the current unix timestamp (number of seconds since the Unix Epoch - January 1 1970 00:00:00 GMT).
|
||||
|
||||
### Example
|
||||
```php
|
||||
<?php
|
||||
echo time();
|
||||
```
|
||||
**Output:**
|
||||
```text
|
||||
1511732226
|
||||
```
|
||||
#### More Information:
|
||||
* <a href="https://secure.php.net/manual/en/function.time.php">php.net time() manual</a>
|
Reference in New Issue
Block a user