Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > ColdFusion

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-13-2011, 12:24 PM   PM User | #1
mobimad
New Coder

 
Join Date: Oct 2009
Location: UK
Posts: 84
Thanks: 12
Thanked 0 Times in 0 Posts
mobimad is an unknown quantity at this point
How do Translate this small Coldfusion Script into PHP

Hi,

I have been following a tutorial and just realised that the script to receive the image is written in Cold Fusion, could anyone be able to translate this into PHP, I do not have a clue about CF

Code:
<cffunction name="uploadPhoto" access="remote" output="false" returntype="struct">
		<cfargument name="photoId" required="true" type="numeric" />
		<cfargument name="photoCaption" required="false" type="string" default=""/>
		<!--- Receive File --->
		<cfargument name="uploaded" required="true" type="any" />

		<!--- Save file --->
		<cfset Variables.Path="/upload"/>
		<cfset Variables.FolderPath="#Expandpath(Variables.Path)#" />
		<cffile action="upload"
 			filefield="uploaded"
 			destination="#Variables.FolderPath#"
 			nameconflict="makeunique"
 			/>

		<!--- Other code --->
		<cfreturn retStruct>
	</cffunction>


Thanks
Jenna
mobimad is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:07 AM.


Advertisement
Log in to turn off these ads.