Jump to content

Running php file locally?


Recommended Posts

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);
?>
 
 

 

Link to comment
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

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...