php的網址
a.php
<?php
/*不知道你是想跳轉還是取回網頁內容後顯示
$type為TRUE時採用頁面跳轉方式
$type為FALSE時採用取回內容後顯示
*/
$type = TRUE;
if( isset( $_GET['url'] ) ){
$url = 'http://' . $_GET['url'];
if( $type ){
header("Location: $url");
}else{
$page = file_get_contents($url);
echo $page;
}
}else{
echo '未設置URL參數';
}
?>
Ⅱ PHP 網址鏈接跳轉
<php
$url = $_GET['url'];
header("location: $url");
?>
把上面的內容保存成url.php文件,
然後鏈接的樣式
www.yoursite.com/url.php?url=http://.com
Ⅲ 急急!!!請問怎麼打開網址後綴名為.php的網頁
這是放置在伺服器上的,本地可以用任何文本編輯器比如記事本打開,但沒什麼意義,看不到網頁的最終效果。
Ⅳ 怎麼打開php網頁
打開這個就可以了
http://218.98.159.19/website/publish/attach.php?id=36584
謝謝我把 給我分
Ⅳ php中如何調用一個網址
你在go.php裡面寫下面的代碼:
$url=$_GET['s'];
switch($url){
case :
header("location:這里是你地址寫上就行") exit();
break;
//……
}
注意運行php,在地址欄上輸入http://localhost/ 看看
我的回答還行吧,有不會的更多問題可以去後盾網論壇問題求助專區,可以幫助你很多!
Ⅵ 「php網站」是什麼意思
首先你要先了解PHP是什麼意思:
各大網路都有介紹:(摘了一部分僅供參考)
PHP,一個嵌套的縮寫名稱,是英文超級文本預處理語言(PHP:Hypertext Preprocessor)的縮寫。PHP 是一種 html 內嵌式的語言,PHP與微軟的ASP頗有幾分相似,都是一種在伺服器端執行的嵌入HTML文檔的腳本語言,語言的風格有類似於C語言,現在被很多的網站編程人員廣泛的運用。
PHP 獨特的語法混合了C、Java、Perl 以及 PHP 自創新的語法。它可以比 CGI 或者 Perl 更快速的執行動態網頁。
PHP最初是由勒多夫在1995年開始開發的;現在PHP的標准由the PHP Group維護。PHP以PHP License作為許可協議,不過因為這個協議限制了PHP名稱的使用,所以和開放源代碼許可協議GPL不兼容。
通俗講PHP是一個腳本語言,PHP,是英文超文本預處理語言Hypertext Preprocessor的遞歸縮寫。PHP 是一種 HTML 內嵌式的語言,是一種在伺服器端執行的嵌入HTML文檔的腳本語言,語言的風格有類似於C語言,被廣泛地運用。可以生成Forms,ComboBoxes,Grid,Menus等的組件,並支持將數據轉為XML/JSON格式,現在互聯網上絕大多數的語言程序用的都是php。
Ⅶ php官方網址是什麼
PHP網站是用PHP語言寫的服務端腳本做成的網站。基本上沒什麼可視化編輯軟體,最多也就是能編HTML部份。PHP部份還是直接編輯代碼。編輯代碼個人覺得 UltraEdit 比較好用。
網路 php 官網
Ⅷ php如何獲得調用網頁的網址
|
用file()函數
下面的代碼是
通過PHP的File函數庫來完成上傳圖像文件並讓其顯示
//FILE1:
<?php
//fulldirectorypath
$filepath="/home/httpd/html/tut/upload";
//200Kisthemaximum(picture)filesizetobeaccepted
define("MAX_FILE_SIZE",200*1024);
functionprint_error($err){
echo"<h1>$err</h1><hr>";
}
do{
//;ifnot,skiptothe
//"while(false)"sectionof"do"statement
if(isset($picture)){
//
//doesn'texceedmaximumallowablesize
if(getenv("CONTENT_LENGTH")>MAX_FILE_SIZE){
print_error("Filetoolarge:$picture_name");
break;
}
//;"@"prefixtellsfopennottoprint
//messageifthereisanerror,sincefunctionprint_errordoesthat
//ifthereisanerror,breakoutof"do"loopandcontinueat"while(false)"
$fp=@fopen($picture,"r");
if(!$fp){
print_error("Cannotopenfile:$picture_name");
break;
}
//generateuniquenameforsession,useittogenerateuniqueserver
//directoryname,andcreatethedirectory
srand((double)microtime()*1000000);
$id=md5(uniqid(rand()));
$dirname="$filepath/$id";
mkdir($dirname,0700);
//
$filename=$dirname."/picture";
//;"@"prefixtellsfopennotto
//printmessageifthereisanerror,sincefunctionprint_errordoesthat
//ifthereisanerror,breakoutof"do"loopandcontinueat"while(false)"
$out=@fopen($filename,"w");
if(!$out){
print_error("Cannotopenfile:$filename");
break;
}
//
while($buffer=fread($fp,8192)){
fwrite($out,$buffer);
}
//
fclose($fp);
fclose($out);
//;thisfilewillholdthe
//nameofthepicturefile
$filename=$dirname."/name";
//;"@"prefixtellsfopennottoprint
//messageifthereisanerror,sincefunctionprint_errordoesthat
//ifthereisanerror,breakoutof"do"loopandcontinueat"while(false)"
$out=@fopen($filename,"w");
if(!$out){
print_error("Cannotopenfile:$filename");
break;
}
//,andclosetheserver
//namefile
fputs($out,$name);
fclose($out);
//
//server,,andsupply
//theHTMLlink
?>
Pictureadded.Thanks.<br>
<ahref="upload_display.php">Continuetothegallery</a>
<?php
//exittotheserverphotogallery
exit();
}
}while(false);
//yougettohereonlywhen"if(isset($picture))"isfalse,whichmeansthat
//nopicturenamehasbeensubmitted,
//
?>
<!--startuploadform-->
<!DOCTYPEHTMLPUBLIC"-//IETF//DTDHTML//EN">
<html>
<head>
<title>Photogallery-add</title>
</head>
<bodybgcolor="white">
<h1>Photogalleryadd</h1>
<?php
//
//using$PHP_SELFforvalueof"formaction"causesformtorefertoitself
//when"submit"buttonisclicked
?>
<formaction="<?echo$PHP_SELF?>"method=POSTENCTYPE="multipart/form-data">
<?php
//passthePHPconstantMAX_FILE_SIZEtotheHTMLmaximumfilesize
//constantMAX_FILE_SIZE
?>
<INPUTTYPE="hidden"name="MAX_FILE_SIZE"value="<?echoMAX_FILE_SIZE?>">
<?php
//,andstore
//;browsingisenabled
?>
Yournameis:<INPUTNAME="name"><br>
Yourpicture:<INPUTNAME="picture"TYPE="file"><br>
<?php
//displaythe"submit"button
?>
<INPUTTYPE="submit"VALUE="Addpicture"name="send">
</form>
</body>
</html>
//------------------------------------------------------
//FILE2:DISPLAYTHESERVERPHOTOGALLERY
<!DOCTYPEHTMLPUBLIC"-//IETF//DTDHTML//EN">
<html>
<head>
<title>Photogallery</title>
</head>
<body>
<h1>Photogallery</h1>
<?php
//fulldirectorypath
$filepath="/home/httpd/html/tut/upload";
//user'spathinbrowser--sameasfulldirectorypath
$url_path="/tut/upload";
//
$dir=dir($filepath);
//
while($entry=$dir->read()){
//ifentryissystemfile(doesn'thavepicturefiles),gotonextentryin
//"while"loop
if($entry=="."||$entry==".."){
continue;
}
//openservernamefileforreadonly;"@"prefixtellsfopennottoprint
//messageifthereisanerror,sincefunctionprint_errordoesthat
//ifthereisanerror,gotonextentryin"while"loop
$fp=@fopen("$filepath/$entry/name","r");
if(!$fp){
print"Badentry:$entry<br>";
continue;
}
//
$name=fgets($fp,4096);
fclose($fp);
//;inaddition,"alt="causesthefile
//
?>
<imgsrc="<?echo"$url_path/$entry/picture"?>"
alt="<?echo$name?>"><b><?echo$name?></b><br>
<?
}
?>
</body>
</html>
Ⅸ 如何通過PHP地址找到網頁
比如你現在看的頁面是
www..com/index.php
那麼鏈接地址為 www..com/admin.php?....
如果你現在看的頁面是http://www..com/或http://www..com
鏈接地址為 www..com/admin.php?....
應該是與你當前瀏覽頁面在同一級目錄下的一個叫做admin.php的文件
兩個$_GET變數action 和 operation 值分別為tools和updatecache