Sign in to follow this  
Followers 0
Dracil

Running php file locally?

2 posts in this topic

As the the title says im looking to run a php file locally. The file dosent connect to a database or anything just has certain function made within php.

Is it possible to run this locally? Some how setting up a service for php?

Lets say i have this code (this is not what im using, im not making a spam bot, just an example)

<?php
// The message
$message "Line 1rnLine 2rnLine 3";

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message wordwrap($message70"rn");

// Send
mail('caffeinated@example.com''My Subject'$message);
?>
 
 

 

Share this post


Link to post
Share on other sites



 

As the the title says im looking to run a php file locally. The file dosent connect to a database or anything just has certain function made within php.

Is it possible to run this locally? Some how setting up a service for php?

Lets say i have this code (this is not what im using, im not making a spam bot, just an example)

<?php

// The message

$message "Line 1rnLine 2rnLine 3";

// In case any of our lines are larger than 70 characters, we should use wordwrap()

$message wordwrap($message70"rn");

// Send

mail('caffeinated@example.com''My Subject'$message);

?>

 
 

 

put that in a file and read the manual, for php

http://php.net/manual/en/features.commandline.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0