euphoric Posted September 22, 2009 Report Share Posted September 22, 2009 FreeBSD serveris, caur ftp metu virsu web failus. (Nezinu vai ir tam kkads sakars, jo Win Serverus neizmantoju). Tātad, situācija tāda : Pieņemsim ir faili "index.php" un "script.php". Iekš script.php poga, nospiežot to, mainās index.php nosaukums piem: index2.php . Ir doma to uztaisīt ar "PHP FTP Functions" . Vai ir vēl kādi varianti, varbūt ātrāki, vieglāki? Vai arī esmu uz pareizā ceļa ? Quote Link to comment Share on other sites More sharing options...
waplet Posted September 22, 2009 Report Share Posted September 22, 2009 <?php system("rename index.php index2.php"); ?> Quote Link to comment Share on other sites More sharing options...
euphoric Posted September 22, 2009 Author Report Share Posted September 22, 2009 Hmm, tik vien ? Un serverim nebūs vajadzīgas paroles un logini ? Quote Link to comment Share on other sites More sharing options...
Klez Posted September 22, 2009 Report Share Posted September 22, 2009 nu ja php fails ir uz taa pasha servera tad nee Quote Link to comment Share on other sites More sharing options...
euphoric Posted September 22, 2009 Author Report Share Posted September 22, 2009 Pāldies :) Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 22, 2009 Report Share Posted September 22, 2009 (edited) Hmm, tik vien ? Nee tik viegli nebuus vis, Vel jau paliek failu tiesiibas, visticamak ka nemaz nevaresi to failu modificeet ( ne rakstiit ,ne mainiit faila nosaukumu) , naksies vien caur FTP uzlikt CHMOD 0777 ( atlajuts visiem useriem & grupam ), protams var buut gadijums ka FTP un PHP ir viens un tas pats leitotajs/grupa, bet nu 99,99% gadijumu tas taa nebuus ( smags iznjemums ir ROOT) ... -- Vieglaks varjants ir PHP izveidotos failus, modificet ar to pashu PHP ( pieskjirt CHMOD ugstaku pieejas pakapi ) neka Otraadi, Ja gribi FTP izveidotos failus ( arii iekopeetos) mainiit, tad naksies vien Simuleet FTP useri, un caur to nomainiit pieejas tiesiibas ... -- Tas ir ar nosacijumu ka serveris ir normali sakonfigurets... --- P.S. protams ats attiecas uz (*nix sistemam ) , WIN shim vispar ir otrskjiriiga noziime Edited September 22, 2009 by Grey_Wolf Quote Link to comment Share on other sites More sharing options...
marcis Posted September 22, 2009 Report Share Posted September 22, 2009 P.S. Ir arī tāda php funkcija kā rename(), protams uz šo arī attiecas tas pats, ko Grey_Wolf jau pastāstīja. Quote Link to comment Share on other sites More sharing options...
euphoric Posted September 22, 2009 Author Report Share Posted September 22, 2009 Man jau likās, ka viss parak elementāri izskatas :D Būs tik jāpastudierē :) Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 22, 2009 Report Share Posted September 22, 2009 Nu ja principaa ja izmanto: shiis, tad tos failus kurus kopeji caur FTP mainiit varesi, bet tos kurus izveidos PHP nevaresi.. Vieniigi neredzu ipashu jegu veidot FTP klientu ar PHP liidzekljiem ... --- Ir protams atseviskji gadijumi, kad Jamaina tieshi faili ( nosaukumi) kas veidoti ar PHP, tad gan sada sistema var noderet, pasham paris dienas atpakalj nacas mainiit veselai kaudzei direktoriju, Pieejas tiesiias ar PHP liidzekljiem ( bija saveidotas direktorijs & subdirektorijas ar PHP , bez tiesiibam modificet caur FTP) Taa ka nacas uzrakstiit nelielu skriptu kas automatiski nominiija CHMOD ja kadam ir intrese tad Skat te.. nav ipashi labkais vrjants, bet savu darbinju izdarija ..... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.