Jump to content
php.lv forumi

faila auģsupielāde


sandis_m

Recommended Posts

bāc... pārceļot visu mapīti ar savu php lapu uz 000webhost bija jāmaina

visi include('site_pages/page.php'); uz include('./site_pages/page.php');

 

 

emm.. un arī faila augšupielādē vairs neko nesaprotu

 

move_uploaded_file($temp,"data/profilepics/$unique_id$filename");

 

vai arī vajag likt priekšā /home/username/public_hmtl/

Edited by who_i_am
Link to comment
Share on other sites

define('ABSPATH', dirname(__FILE__));

 

to liec root failaa (ceru, ka tev taads ir) un vienmeer lieto ABSPATH konstanti priekshaa visam, piemeeram

 

include ABSPATH . '/random/dir/file.php';

move_uploaded_file($temp, ABSPATH . '/uploads/' . $filename);

 

Protams ieviest vairaakas konstantes buutu veel labaak.

Edited by rATRIJS
Link to comment
Share on other sites

define('ABSPATH', dirname(__FILE__));

 

to liec root failaa (ceru, ka tev taads ir) un vienmeer lieto ABSPATH konstanti priekshaa visam, piemeeram

 

include ABSPATH . '/random/dir/file.php';

move_uploaded_file($temp, ABSPATH . '/uploads/' . $filename);

 

Protams ieviest vairaakas konstantes buutu veel labaak.

 

 

 

paldies

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...